<- [[.:prplreference| PRPL reference]] <- [[.:prplreference#vars_and_functions|Vars and Functions]] ===== -?*VARNAME ===== ^Arguments^Result^Notation^ | none | True/False | [ - b1 ] | === Description === 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. === Examples === # 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));