Wow I've been very active on the forums lately, But apparently, my CRPL skills bring
me back here again (but at least im learning :D).
I've been trying to create a CRPL code that sends a user defined amount of spores to
a user defined set of coordinates with a user defined delay, I've had countless attempts
and all i got was a code that compiled, but didn't do what it should.
Could someone show me how to fix it? (attached as a txt doc, its called tutorial 2 because
I was learning about stuff for CRPL)
Thanks
Try this
$x:0
$y:0
$del:150
$no_of_spores:1
if (->no_of_spores 1 gte)
CurrentCoords ->x ->y 1 10 CreateSpore
->del delay
<-no_of_spores 1 sub ->no_of_spores
endif
Unfortunately it did not work :(, it just sit there looking pretty, it seems as if its just completely missing out the "if" part. Weird.
Try this
$x:0
$y:0
$del:150
$no_of_spores:1
if (<-no_of_spores 1 gte)
CurrentCoords ->x ->y 1 10 CreateSpore
->del delay
<-no_of_spores 1 sub ->no_of_spores
endif
Same thing J, also same code as hubs' but oh well, mistakes happen. :P
I changed one set_variable (->) to get_variable (<-), but there were three more that had to be changed, try this one:
$x:0
$y:0
$del:150
$no_of_spores:1
if (<-no_of_spores 1 gte)
CurrentCoords <-x <-y 1 10 CreateSpore
<-del delay
<-no_of_spores 1 sub ->no_of_spores
endif
Ok Cool it's working now, Thanks J
And so the map making begins....
I wonder if I'm not so good at CRPL because I use python as a coding language.
The thing with CRPL is wrapping your head around RPN (reverse polish notation - and the stack it uses). Anyone who had one of the old HP RPN calculators probably has less trouble with CRPL. :)