<- PRPL reference <- Vars and Functions
| Arguments | Result | Notation |
|---|---|---|
| none | True/False | [ - b1 ] |
Checks to see if global variable VARNAME exists (has been assigned). If so, 1 is pushed to the stack else 0. Global variables can be accessed by any script on the map.
# In one script:
42 ->*myGlobalVariable
# In any script on the same map after that point:
-?*myGlobalVariable if
"myGlobalVariable exists."
else
"myGlobalVariable does not exist."
endif
trace
# Puts "myGlobalVariable exists." in the debug window.
stack.Push(new Data(GameSpace.instance.globalHeap.ContainsKey(command.data.GetString()) ? 1 : 0));