OsGetNumberOfNotecardLines

From OpenSimulator

Revision as of 08:40, 11 June 2011 by Fritigern (Talk | contribs)

Jump to: navigation, search
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.

Personal tools
General
About This Wiki