diff options
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r-- | LuaSL/src/LSL.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua index a89c06f..8861bf3 100644 --- a/LuaSL/src/LSL.lua +++ b/LuaSL/src/LSL.lua | |||
@@ -25,6 +25,7 @@ upvalue--either way is a bit more efficient and less error prone. | |||
25 | 25 | ||
26 | local LSL = {}; | 26 | local LSL = {}; |
27 | local SID = ""; | 27 | local SID = ""; |
28 | local scriptName = ""; | ||
28 | 29 | ||
29 | -- Debugging aids | 30 | -- Debugging aids |
30 | 31 | ||
@@ -567,6 +568,13 @@ function --[[list]] LSL.llParseString2List(--[[string]] In, --[[list]] l, --[[li | |||
567 | function --[[list]] LSL.llParseStringKeepNulls(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end; | 568 | function --[[list]] LSL.llParseStringKeepNulls(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end; |
568 | 569 | ||
569 | 570 | ||
571 | -- LSL script functions | ||
572 | |||
573 | function --[[string]] LSL.llGetScriptName() | ||
574 | return scriptName | ||
575 | end | ||
576 | |||
577 | |||
570 | -- Crements stuff. | 578 | -- Crements stuff. |
571 | 579 | ||
572 | function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; | 580 | function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; |
@@ -612,11 +620,12 @@ function LSL.stateChange(x) | |||
612 | end | 620 | end |
613 | end; | 621 | end; |
614 | 622 | ||
615 | function LSL.mainLoop(sid, x) | 623 | function LSL.mainLoop(sid, name, x) |
616 | local status, errorMsg = luaproc.newchannel(sid) | 624 | local status, errorMsg = luaproc.newchannel(sid) |
617 | local result | 625 | local result |
618 | 626 | ||
619 | SID = sid | 627 | SID = sid |
628 | scriptName = name | ||
620 | 629 | ||
621 | LSL.EOF = "\n\n\n" -- Fix this up now. | 630 | LSL.EOF = "\n\n\n" -- Fix this up now. |
622 | 631 | ||