OsGetNumberOfNotecardLines

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (XEngine to OSSL)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''osGetNumberOfNotecardLines'''(string name)  
+
{{osslfunc
 +
|threat_level=VeryHigh
 +
|permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
 +
|delay=0
 +
|function_syntax=integer osGetNumberOfNotecardLines(string name)  
 +
|ossl_example=<source lang="lsl">
 +
// osGetNumberOfNotecardLines example
  
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:  
+
default
 +
{
 +
    state_entry()
 +
    {
 +
        string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0);
 +
        integer length=osGetNumberOfNotecardLines(notecard);
 +
        llSay(0, "NumberOfNotecardLines is: " + (string) length);
  
<br> ''From OSSL_Api.cs:''
 
<blockquote>"due to the synchronous method this function uses to fetch assets, its use may be dangerous and unreliable while running in grid mode."</blockquote>
 
 
 
<code><pre>//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));
 
        }
 
 
     }
 
     }
 
}
 
}
</pre></code>
+
</source>
 
+
|description=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.
--[[User:ZauberExonar|ZauberExonar]] 08:19, 5 February 2010 (UTC)
+
|
 +
}}

Latest revision as of 07:36, 7 November 2019

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 ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
// osGetNumberOfNotecardLines example
 
default 
{
    state_entry()
    {
        string notecard = llGetInventoryName(INVENTORY_NOTECARD, 0);
        integer length=osGetNumberOfNotecardLines(notecard);
        llSay(0, "NumberOfNotecardLines is: " + (string) length);
 
    }
}
Personal tools
General
About This Wiki