OsGetNumberOfNotecardLines
From OpenSimulator
(Difference between revisions)
(Ah, some LSL source formatting escaped my attention....) |
|||
Line 1: | Line 1: | ||
− | ''' | + | {| width="100%" style="border: thin solid black" |
+ | | colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}''' | ||
+ | |- valign="top" | ||
+ | |'''Threat Level''' || VeryHigh | ||
− | + | |- valign="top" | |
− | + | |'''Function Syntax''' || <source lang="lsl"> | |
− | + | osGetNumberOfNotecardLines(string name) | |
− | < | + | </source> |
− | + | |- valign="top" | |
− | + | |'''Example(s)||<source lang="lsl">//Example usage: | |
− | <source lang="lsl">//Example usage: | + | |
default { | default { | ||
state_entry() { | state_entry() { | ||
Line 19: | Line 21: | ||
</source> | </source> | ||
+ | |} | ||
+ | This function directly reads how many lines a notecard has if the specified notecard exists within the task inventory, bypassing the dataserver event to reduce code complexity. | ||
− | [[Category:OSSL]] | + | [[Category:OSSL Functions]] |
Revision as of 08:40, 11 June 2011
OsGetNumberOfNotecardLines | |
Threat Level | VeryHigh |
Function Syntax | osGetNumberOfNotecardLines(string name) |
Example(s) | //Example usage: default { state_entry() { integer i; string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0); for(i=1; i<=osGetNumberOfNotecardLines(notecard); i++) { llSay(0, osGetNotecardLine(notecard, i)); } } } |
This function directly reads how many lines a notecard has if the specified notecard exists within the task inventory, bypassing the dataserver event to reduce code complexity.