OsGetNumberOfNotecardLines
From OpenSimulator
(Difference between revisions)
(Ah, some LSL source formatting escaped my attention....) |
|||
Line 7: | Line 7: | ||
− | < | + | <source lang="lsl">//Example usage: |
default { | default { | ||
state_entry() { | state_entry() { | ||
Line 17: | Line 17: | ||
} | } | ||
} | } | ||
− | </ | + | </source> |
[[Category:OSSL]] | [[Category:OSSL]] |
Revision as of 07:06, 8 June 2011
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. This function has a threat level of Very High:
From OSSL_Api.cs:
"due to the synchronous method this function uses to fetch assets, its use may be dangerous and unreliable while running in grid mode."
//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)); } } }