[Opensim-users] LSL Syntax in Opensim - restrictions?

Karen Palen karen_palen at yahoo.com
Wed Dec 9 16:05:09 UTC 2009


I haven't run into that one yet, but I finding that the OpenSim script engine is stricter than the LSL engine in SL.

The error trace and messages are not as complete as I would like either.

Unfortunately the line count for the error message tends to be inaccurate as well. I will try to document a few examples next time I play with scripting.

I have not found that unimplemented functions are a problem since there are only a few which are still not handled at all in OpenSim. They are well documented in the wiki.

The most troublesome problem so far is variable scoping problems, where a variable (e.g. i) is reused within the defined scope. The SL script engine will allow this even though it is bad practice, the OpenSim script engine rejects it. 

This gets to be a major problem if the actual intent of the scoping is not obvious and the obvious fix (i -> i1, i2, etc.) results in changing the functionality of the code!

In one case (the GPL version of Prim Skirt Builder) I have 6 or 7 redefinitions of "i" to deal with.

So far a close examination of the code has revealed the problem eventually.

Another thing to watch is the allowed functions in the config file, on a private sim (e.g. development) you need to allow everything, but on a public sim you need to restrict the available OS functions for security. This too can cause apparent syntax errors.

Karen

--- On Wed, 12/9/09, Ai Austin <ai.ai.austin at googlemail.com> wrote:

> From: Ai Austin <ai.ai.austin at googlemail.com>
> Subject: [Opensim-users] LSL Syntax in Opensim - restrictions?
> To: opensim-users at lists.berlios.de
> Date: Wednesday, December 9, 2009, 3:27 AM
> I know there are a few issues with
> some syntax forms of 
> conditionals... can someone remind me what the issues are
> in moving 
> LSL code from SL to Opensim.
> 
> e.g. this one fails with a syntax error
> 
>              if(
> ((c = llList2Float(time,a)) <= ticks) || 
> (llGetAgentSize(d = llList2Key(users,a)) ==
> <0.0,0.0,0.0>))
> 
> is it one of the things not yet allowed?
> 
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
> 


      



More information about the Opensim-users mailing list