OsGetNumberOfNotecardLines
From OpenSimulator
(Difference between revisions)
m (some syntax modification (may be major or minor)) |
|||
Line 3: | Line 3: | ||
|function_syntax=integer osGetNumberOfNotecardLines(string name) | |function_syntax=integer osGetNumberOfNotecardLines(string name) | ||
|ossl_example=<source lang="lsl">//Example usage: | |ossl_example=<source lang="lsl">//Example usage: | ||
− | default { | + | default |
− | state_entry() | + | { |
− | + | state_entry() | |
+ | { | ||
string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0); | string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0); | ||
− | + | integer length=osGetNumberOfNotecardLines(notecard); | |
− | + | llSay(0, "NumberOfNotecardLines is: " + (string) length); | |
− | + | ||
} | } | ||
} | } |
Revision as of 04:59, 12 July 2015
integer osGetNumberOfNotecardLines(string name)
| |
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. | |
Threat Level | VeryHigh |
Permissions | No permissions specified |
Extra Delay | No function delay specified |
Example(s) | |
//Example usage: default { state_entry() { string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0); integer length=osGetNumberOfNotecardLines(notecard); llSay(0, "NumberOfNotecardLines is: " + (string) length); } } |