Difference between revisions of "Jump"
Jump to navigation
Jump to search
m (<lsl> example) |
m |
||
Line 18: | Line 18: | ||
</div> | </div> | ||
}}{{#vardefine:examples| | }}{{#vardefine:examples| | ||
<lsl> | <lsl>integer a = 5; | ||
integer a = 5; | |||
jump over; | jump over; | ||
@in; | @in; | ||
Line 27: | Line 26: | ||
if(a < 6) | if(a < 6) | ||
jump in; | jump in; | ||
//script will say 5 and then 6 | //script will say 5 and then 6</lsl> | ||
</lsl> | |||
}}{{#vardefine:notes| | }}{{#vardefine:notes| | ||
}}{{#vardefine:caveats|A target does not work with multiple jumps in all cases. | }}{{#vardefine:caveats|A target does not work with multiple jumps in all cases. |
Revision as of 01:41, 1 January 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
- The correct title of this article is jump. The initial letter is shown capitalized due to technical restrictions.
jump target;
jump target;• label | target | – | Name of a label inside the same leg of the scope hierarchy tree |
@target;
• label | target | – | A label that can be jumped to if the jump is in the same scope or child scope. |
Caveats
A target does not work with multiple jumps in all cases.
For multiple jumps you may need to use additional targets.
It is currently unknown if this is a technical limitation, oversight or bug.
Examples
<lsl>integer a = 5; jump over; @in; a = 6; @over; llOwnerSay((string)a); if(a < 6)
jump in;
//script will say 5 and then 6</lsl>