Difference between revisions of "Label"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: '''Label''' is a part of almost any script. It is a sequence of characters that identifies a specific location within the script. In Sanny Builder labels are denoted with a : (colon si...)
 
m
Line 5: Line 5:
 
Example:
 
Example:
  
:Label
+
<source lang="scm">:Label</source>
  
 
Labels are widely used in scripts in [[0002|unconditional]] and [[Conditional statement|conditional]] jumps. To jump to specific label, you must use its name with a @ (at sign) as the first character.
 
Labels are widely used in scripts in [[0002|unconditional]] and [[Conditional statement|conditional]] jumps. To jump to specific label, you must use its name with a @ (at sign) as the first character.
Line 11: Line 11:
 
Example:
 
Example:
  
0002: jump @Label
+
<source lang="scm">0002: jump @Label</source>
  
 
Sanny Builder also has a feature to display a list of all labels used in source code when you press a @ button.
 
Sanny Builder also has a feature to display a list of all labels used in source code when you press a @ button.
  
 
[[Category:Mission_Scripting]]
 
[[Category:Mission_Scripting]]

Revision as of 17:54, 2 February 2009

Label is a part of almost any script. It is a sequence of characters that identifies a specific location within the script. In Sanny Builder labels are denoted with a : (colon sign) as the first character.

A label name must contain only letters, digits and underscore sign (_).

Example:

:Label

Labels are widely used in scripts in unconditional and conditional jumps. To jump to specific label, you must use its name with a @ (at sign) as the first character.

Example:

0002: jump @Label

Sanny Builder also has a feature to display a list of all labels used in source code when you press a @ button.