llEval
Revision as of 10:34, 24 April 2010 by ANSI Soderstrom (talk | contribs) (→It would be great to execute outsourced Code where stored in a string.)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
LSL Feature Request | |
The described function does not exist. This article is a feature request. |
Summary
Function: integer llEval( string code );REQUEST | Function ID |
0.0 | Forced Delay |
0.0 | Energy |
Returns an integer to see the success of eval´d code.
-1 = Parse error in Eval´d code
0 = Success, but without return in Eval´d code
• string | code | – | a string with different LSL-functions |
Caveats
Examples
<lsl> default {
state_entry() { string code = "llOwnerSay(\"Hello World\")"; if( llEval(code) != -1 ) { llOwnerSay("...it works !!! Try now more complex :"); llOwnerSay((string)llEval("llOwnerSay(\"Must be 23 : \"); return 23;")); } else { llOwnerSay("Parse Error in Eval´d code"); } }
// Output : // Hello World // ...it works !!! Try now more complex : // Must be 23 : 23
}
</lsl>