Warning: Parameter 1 to Language::getMagic() expected to be a reference, value given in /var/www/sda/2/c/digigrids/wiki/includes/StubObject.php on line 58

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/sda/2/c/digigrids/wiki/includes/MagicWord.php on line 675
Scripting/Variables/en - DigiWiki

Scripting/Variables/en

De DigiWiki.

Ligne 14 : Ligne 14 :
list    entries = ["A list may contain many types of values such as", 2, 1.2, <0.4, 0.8, 1.6>];
list    entries = ["A list may contain many types of values such as", 2, 1.2, <0.4, 0.8, 1.6>];
vector  vec_2  = <1,6,2>;      //Generally used for position as xyz, but can be used to store 3 numbers to be parsed out later
vector  vec_2  = <1,6,2>;      //Generally used for position as xyz, but can be used to store 3 numbers to be parsed out later
-
rotation _rot    = <1,2,3,4>;    //Can also be used to store 4 numbers to be parsed out later</lsl>
+
rotation _rot    = <1,2,3,4>;    //Can also be used to store 4 numbers to be parsed out later
 +
</lsl>
== Scope of variables ==
== Scope of variables ==
A variable can be limited to only certain parts of the script, depending upon where it is placed.  This placement, and the areas where it is enabled is called the "scope."  Variables that apply to the entire script are called global variables: they are defined at the top of the script above the state declarations.  Variables that are within functions or within nested areas are considered local variables.
A variable can be limited to only certain parts of the script, depending upon where it is placed.  This placement, and the areas where it is enabled is called the "scope."  Variables that apply to the entire script are called global variables: they are defined at the top of the script above the state declarations.  Variables that are within functions or within nested areas are considered local variables.
Ligne 47 : Ligne 48 :
}
}
</lsl>
</lsl>
-
 
-
 
Converting between variable types is know as casting. for example in the script above, the global variable i has a value of 50. This can be cast to a string to send the value as text to the chat window. This can also be done with local variables.
Converting between variable types is know as casting. for example in the script above, the global variable i has a value of 50. This can be cast to a string to send the value as text to the chat window. This can also be done with local variables.
This is commonly used for debugging a script.
This is commonly used for debugging a script.

Version du 23 janvier 2012 à 16:43

Outils personnels
donate
Google Ads