Skip to content

LSL vs SLua

SLua is documented on the sister site slua.dev. Its guide LSL vs SLua compares the two languages side by side for LSL scripters.

The Second Life Viewer 26.5 script editor treats the two as different source languages. Its Compiler dropdown offers LSL on Mono, LSL Legacy, LSL on Lua and Lua; the two Lua entries are only enabled on regions whose simulator features report LuaScriptsEnabled.1 On such regions a new script defaults to Lua, both from the Build tool’s Content tab and in your inventory, so pick LSL explicitly when you want it.2 Line numbers count from 0 in an LSL script and from 1 in a Lua script.3 Details are under Script editor.

  1. Viewer 746d768339: newview/skins/default/xui/en/panel_script_ed.xml:244-259; newview/llpreviewscript.cpp:134-155; newview/llpreviewscript.cpp:556-564 ↩

  2. Viewer 746d768339: newview/llpanelcontents.cpp:150-171; newview/llviewerinventory.cpp:1789-1800 ↩

  3. Viewer 746d768339: newview/llscripteditor.cpp:321; newview/llpreviewscript.cpp:780-790 ↩