[Opensim-users] LSL Syntax in Opensim - restrictions?
Justin Clark-Casey
jjustincc at googlemail.com
Thu Dec 10 18:13:55 UTC 2009
Ai Austin wrote:
> At 05:54 10/12/2009, rrid Luna <torrid at primforge.com> wrote:
>>> if( ((c = llList2Float(time,a)) <= ticks) ||
>>> (llGetAgentSize(d = llList2Key(users,a)) == <0.0,0.0,0.0>))
>>>
>> the argument to if contains an assignment (c = llL...) which itself
>> returns either a Boolean (in the sense of "Success") or the value of
>> the successfully changed variable in SL-LSL and other languages. In
>> SL-LSL it behaves like that, and is allowed (although bad style),
>> but not in Opensim-LSL.
>>
>> You can rewrite it as
>>
>> c = llList2Float(time,a);
>> d = llList2Key(users,a);
>>
>> if (c <= ticks || llGetAgentSize(d) == <0.0 ,0.0 ,0.0>){
>
>
> Thank Torrid, that does indeed fix the LSL syntax problem - in fact
> in a federated window script for the open source "Archer
> House". There are some issues with UUIDS of the various window
> textures to get it working properly, but that is a separate issue.
There are some general issues with LSL statements that have extra parentheses.
I fixed one to do with parsing if statements in
http://opensimulator.org/mantis/view.php?id=3874
but there's probably a better generalizable fix for parenthesis related issues.
rogerwo suggested that there shouldn't really be a ParenthesisExpression node
in the LSL parser since the information is already inherently coded within the
abstract syntax tree. Unfortunately, I haven't had any time to look at this
recently (and it's important but below the other important things on my personal
list :).
--
Justin Clark-Casey (justincc)
http://justincc.org
http://twitter.com/justincc
More information about the Opensim-users
mailing list