~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:GetScriptVar|Get]] * [[4rpl:commands:SetScriptVar|Set]] ====== GetScriptVar ====== GetScriptVar(<-unit <-scriptName <-varName) ->val ===== Description ===== 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 extention ".4rpl" must be included.\\ 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. ===== Examples ===== GetScriptVar(<-someUnitUID "MyScript.4rpl" "test") ->val <=[[4rpl:start| Index]]