OsGetNotecardLine

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (some format conversions)
Line 1: Line 1:
{{osslfunc|
+
{{osslfunc
threat_level = VeryHigh
+
|threat_level=VeryHigh
|
+
|function_syntax=osGetNotecardLine(string name, integer line)  
function_syntax = <source lang="lsl">
+
|ossl_example=<source lang="lsl">
osGetNotecardLine(string name, integer line)  
+
</source>
+
|
+
ossl_example = <source lang="lsl">
+
 
//Example usage:
 
//Example usage:
 
default {
 
default {
Line 18: Line 14:
 
}
 
}
 
</source>
 
</source>
|  
+
|description=This function directly reads a line of text from the specified notecard, if it exists within the task inventory, and returns the text as a string. It skips the dataserver event, thereby reducing code complexity.  
additional_info = This function directly reads a line of text from the specified notecard, if it exists within the task inventory, and returns the text as a string. It skips the dataserver event, thereby reducing code complexity.  
+
 
|
 
|
 
}}
 
}}

Revision as of 20:33, 1 July 2011

osGetNotecardLine(string name, integer line)
This function directly reads a line of text from the specified notecard, if it exists within the task inventory, and returns the text as a string. It skips the dataserver event, thereby reducing 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