User Tools

Site Tools


4rpl:commands:getscriptvar

Differences

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

Link to this comparison view

Next revision
Previous revision
4rpl:commands:getscriptvar [2021/01/08 16:01] – external edit 127.0.0.14rpl:commands:getscriptvar [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
 +
 +<WRAP tabs>
 +  * [[4rpl:commands:GetScriptVar|Get]]
 +  * [[4rpl:commands:SetScriptVar|Set]]
 +</WRAP>
  
 ====== GetScriptVar ====== ====== GetScriptVar ======
Line 6: Line 11:
  
 ===== Description ===== ===== Description =====
-Gets the named variable on the specified unit and script. +Gets the named variable on the specified unit and script.\\ 
-The script is referenced by name. If the name is an empty string, the first (possibly only) script on the unit will be referenced. +The script is referenced by name. If the name is an empty string, the first (possibly only) script on the unit will be referenced. The extention ".4rpl" must be included.\\ 
-The value returned will be a direct instance of the var held by the unit. +The value returned will be a direct instance of the var held by the unit. If the unit or var does not exit, a null value (equivalent to 0) is returned.
-If the unit or var does not exit, a null value (equivalent to 0) is returned.+
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-GetScriptVar(<-someUnitUID "MyScript" "test") ->val+GetScriptVar(<-someUnitUID "MyScript.4rpl" "test") ->val
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/getscriptvar.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)