The failure was because there was no caption for setdownload. Something
like the following should work:


NB.*setdownload v set download

On Tue, Sep 9, 2014 at 5:21 PM, tom arneson <[email protected]> wrote:

> Chris: I got Joxygen to work on one of my scripts, but it chokes on another
> with the following displayed in Terminal:
>
>    load 'c:/users/tom
> arneson/j64-802-user/projects/vexilla-2013/docs/makedocs.ijs'
> processnew.ijs
> downloadvx.ijs
> |index error: pick
> |   y=.(3{.y),('desc';upper1 termstop(<2 1)    pick y),3}.y
>
> The error occurs in verb: adddesc  which is called from verb: makescript
> when processing the following script:
>
> NB. =========================================================
> NB.%downloadvx.ijs - download VX points
> NB. Purpose:    download VX points
> NB. Update:     2013-09-21
> NB. =========================================================
>
> require '~addons/format/printf/printf.ijs'
> require '~addons/web/gethttp/gethttp.ijs'
> require '~addons/tables/csv/csv.ijs'
>
> NB. ---------------------------------------------------------
> NB.*setdownload v
> NB. y must be boxed list of literals
> setdownload=: verb define
>
> '
> http://geovexilla.gpsgames.org/cgi-bin/vx.pl?download=1&mapcenterlat=%s&map
> centerlon=%s&downloadformat=%s&downloadradius=%s&player=Tom+Arneson'
> sprintf
> y
> )
>
> NB. ---------------------------------------------------------
> NB.*downloadvx v downloads from Geovexilla website
> downloadvx=: verb define
>   PATH=. '~Projects/data/geovex/'
>   LAT=. '45' [ LON=. '-93' [ RAD=. '500'
>
>   data=. > chopcsv each <;. _2 gethttp setdownload LAT;LON;'CSV';RAD
>   head=. 0{data
>   data=. 1}.data
>
>   NB. sort by VX name and write to csv
>   data=. (/: 1{"1 data){data
>   (head,data) writecsv PATH,'geovexilla.csv'
>   ld=. 10{.>0{_1{data           NB. last date
>   f=. (<ld)=10{. each 0{"1 data
>
>   NB. update dailycount.csv
>   ('%s,%d,%d'sprintf ld;(+/f);#data) fappends PATH,'dailycount.csv'
>
>   NB.save gpx in file: new.gpx
>   gpx=. gethttp setdownload LAT;LON;'GPX';RAD
>   gpx fwrite PATH,'new.gpx'
>
>   NB. return literal new VX count
>   'Last date: %s\nNew count: %d\nGeoVexilla count: %d' sprintf
> ld;(+/f);#data
> )
>
> NB. ---------------------------------------------------------
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to