OsGetNumberOfNotecardLines

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New page: '''osGetNumberOfNotecardLines'''(string name) This function directly reads how many lines a notecard has, bypassing the dataserver event to reduce code complexity. This function has a t...)
 
Line 1: Line 1:
 
'''osGetNumberOfNotecardLines'''(string name)  
 
'''osGetNumberOfNotecardLines'''(string name)  
  
This function directly reads how many lines a notecard has, bypassing the dataserver event to reduce code complexity.  This function has a threat level of Very High:  
+
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:  
  
 
<br> ''From OSSL_Api.cs:''  
 
<br> ''From OSSL_Api.cs:''  

Revision as of 00:13, 5 February 2010

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));
        }
    }
}
Personal tools
General
About This Wiki