Difference between revisions of "Category:Statements"
From SphereWiki
MrSugarCube (talk | contribs) m |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 35: | Line 35: | ||
|- | |- | ||
| [[WHILE]] ''condition'' || ENDWHILE || Loops through the block of code whilst ''condition'' is true. | | [[WHILE]] ''condition'' || ENDWHILE || Loops through the block of code whilst ''condition'' is true. | ||
+ | |- | ||
+ | | <local._for> || || Current Step of the Loop for the FOR statements. Note, not all of the FOR statements use this concept... for example, in a FORITEMS statement, the <local._for> counter will always be zero no matter how many objects the statement loops over. | ||
+ | |- | ||
+ | | <local._while> || || Current Step of the Loop for the WHILE statement. | ||
|} | |} | ||
[[Category: Reference Compendium]] | [[Category: Reference Compendium]] | ||
[[Category: Scripts]] | [[Category: Scripts]] |
Latest revision as of 00:27, 28 August 2013
Statement | End Statement | Description |
BEGIN | END | Groups a set of lines together, for use with DORAND and DOSWITCH statements. |
DORAND line_count | ENDDO | Executes a random line of code within the block. |
DOSWITCH line_number | ENDDO | Executes the specified line of code within the block. |
FOR start end | ENDFOR | Loops through the block of code |
FORCHARLAYER layer_id | ENDFOR | Loops through all items that a character has equipped on a specified layer. |
FORCHARMEMORYTYPE memory_flags | ENDFOR | Loops through all memory items on a character that have one of the specified flags. |
FORCHARS distance | ENDFOR | Loops through all characters within distance tiles. |
FORCLIENTS distance | ENDFOR | Loops through all connected clients within distance tiles. |
FORCONT container_uid, max_subcontainers | ENDFOR | Loops through all items inside a container. |
FORCONTID item_id, max_subcontainers'' | ENDFOR | Loops through all items inside a container with a specified BASEID |
FORCONTTYPE type, max_subcontainers | ENDFOR | Loops through all items inside a container with a specified TYPE |
FORINSTANCES defname | ENDFOR | Loops through all instances of characters or items with the specified BASEID |
FORITEMS distance | ENDFOR | Loops through all items within distance tiles. |
FOROBJS distance | ENDFOR | Loops through all items and players within distance tiles. |
FORPLAYERS distance | ENDFOR | Loops through all players (online and offline) within distance tiles. |
IF condition ELIF condition ELSEIF condition |
ENDIF | Executes the block of code if condition is true. |
WHILE condition | ENDWHILE | Loops through the block of code whilst condition is true. |
<local._for> | Current Step of the Loop for the FOR statements. Note, not all of the FOR statements use this concept... for example, in a FORITEMS statement, the <local._for> counter will always be zero no matter how many objects the statement loops over. | |
<local._while> | Current Step of the Loop for the WHILE statement. |
This category currently contains no pages or media.