Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:scripting_portal:opensim_lsl_differences [2019/05/18 23:47] (current)
Royale Mobian created
Line 1: Line 1:
 +====== OpenSim LSL differences ======
 +LSL in OpenSim has some differences that should be taken into consideration when scripting in Opensim. These differences,​ however, are planned to be corrected to do expected LSL behavior as found in LSL on Second Life.
  
 +===== Function Calls =====
 +One major difference between LSL on SL and LSL on OpenSim (besides missing functions) is that you can't do assignments in function calls.
 +=== Example ===
 +  * This will work:
 +<code ossl>
 +integer something = 10;
 +doThing(something);​
 +</​code>​
 +  * This won't work:
 +<code ossl>
 +integer something;
 +doThing(something = 10);
 +</​code>​
 +
 +===== LSL Functions =====
 +==== llSetLinkPrimitiveParams & llSetLinkPrimitiveParamsFast ====
 +Currently on OpenSim you can't have the linknumber as 0 and set it in a parameter on linksets
 +=== Example ===
 +  * This will work:
 +<code ossl>
 +list params = [ PRIM_LINK_TARGET,​ 2, PRIM_SIZE, < 1, 1, 1> ];
 +llSetLinkPrimitiveParamsFast( 1, params );
 +</​code>​
 +  * This won't work:
 +<code ossl>
 +list params = [ PRIM_LINK_TARGET,​ 2, PRIM_SIZE, < 1, 1, 1> ];
 +llSetLinkPrimitiveParamsFast( 0, params );
 +</​code>​
 +
 +===== Json and blank strings =====
 +Another diffrence is currently jsons don't work correctly from blank strings on OpenSim
 +=== Example ===
 +  * This will work:
 +<code ossl>​string json = llJsonSetValue( "​{}",​ [ "​oi"​ ], "​hello"​ );</​code>​
 +
 +  * This won't work:
 +<code ossl>​string json = llJsonSetValue( "",​ [ "​oi"​ ], "​hello"​ );</​code>​
QR Code
QR Code wiki:scripting_portal:opensim_lsl_differences (generated for current page)