This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
crpl:docs:exists [2013/01/14 18:39] – created virgilw | crpl:docs:exists [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | TODO | + | |
+ | <- [[crpl: | ||
+ | |||
+ | ===== -? | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | -?! | ||
+ | |||
+ | |||
+ | === Description === | ||
+ | Checks to see if VARNAME exists (has been assigned). | ||
+ | If so, 1 is pushed to the stack else 0. | ||
+ | Local variables persist across script invocations. | ||
+ | === Examples === | ||
+ | <code 4RPL> | ||
+ | # check to see if variable " | ||
+ | # If not, fire a spore and set the variable so no | ||
+ | # further spores will launch. | ||
+ | -?Spore if | ||
+ | CurrentCoords RandUnitCoords 1 20 CreateSpore | ||
+ | " | ||
+ | endif | ||
+ | </ |