User Tools

Site Tools


crpl:docs:exists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:exists [2013/12/19 16:44] – Fixed example Clean0nioncrpl:docs:exists [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#vars_and_functions|Vars and Functions]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#vars_and_functions|Vars and Functions]]
  
 =====  -?VARNAME  ===== =====  -?VARNAME  =====
  
-^Arguments^Result^Notation^ +===== Syntax ===== 
-| |0 or 1 depending on if VARNAME exists |'' -i1''|+ 
 +-?!
  
  
Line 13: Line 14:
 Local variables persist across script invocations. Local variables persist across script invocations.
 === Examples === === Examples ===
-<code>+<code 4RPL>
 # check to see if variable "Spore" exists.  # check to see if variable "Spore" exists. 
 # If not, fire a spore and set the variable so no  # If not, fire a spore and set the variable so no 
 # further spores will launch.  # further spores will launch. 
 -?Spore if  -?Spore if 
- # A spore has already been fired 
-else 
  CurrentCoords RandUnitCoords 1 20 CreateSpore   CurrentCoords RandUnitCoords 1 20 CreateSpore 
  "fired" ->Spore   "fired" ->Spore 
crpl/docs/exists.1387471468.txt.gz · Last modified: 2025/02/14 14:56 (external edit)