OsGetNumberOfNotecardLines

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (some format conversions)
m (some syntax modification (may be major or minor))
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=VeryHigh
 
|threat_level=VeryHigh
|function_syntax=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 {

Revision as of 02:30, 2 July 2011

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() {
        integer i;
        string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0);
        for(i=1; i&lt;=osGetNumberOfNotecardLines(notecard); i++) {
            llSay(0, osGetNotecardLine(notecard, i));
        }
    }
}
Personal tools
General
About This Wiki