diff options
Diffstat (limited to 'LuaSL')
-rw-r--r-- | LuaSL/src/LSL.lua | 5 | ||||
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua index c2e4d1c..7a47a69 100644 --- a/LuaSL/src/LSL.lua +++ b/LuaSL/src/LSL.lua | |||
@@ -567,12 +567,11 @@ function LSL.stateChange(x) | |||
567 | end | 567 | end |
568 | end; | 568 | end; |
569 | 569 | ||
570 | function LSL.mainLoop(ourSID, x) | 570 | function LSL.mainLoop(sid, x) |
571 | local sid = ourSID .. ".events" | ||
572 | local status, errorMsg = luaproc.newchannel(sid) | 571 | local status, errorMsg = luaproc.newchannel(sid) |
573 | local result | 572 | local result |
574 | 573 | ||
575 | SID = ourSID | 574 | SID = sid |
576 | 575 | ||
577 | if not status then | 576 | if not status then |
578 | msg("Can't open the luaproc channel " .. sid .. " ERROR MESSAGE: " .. errorMsg) | 577 | msg("Can't open the luaproc channel " .. sid .. " ERROR MESSAGE: " .. errorMsg) |
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 805f26e..95761a2 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -2275,7 +2275,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants) | |||
2275 | fprintf(out, "local _bit = require(\"bit\")\n"); | 2275 | fprintf(out, "local _bit = require(\"bit\")\n"); |
2276 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); | 2276 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); |
2277 | // TODO - Use the scripts UUID instead of the file name here, or something. | 2277 | // TODO - Use the scripts UUID instead of the file name here, or something. |
2278 | fprintf(out, "local _SID = [=[%s.lua.out]=]\n\n", compiler.fileName); | 2278 | fprintf(out, "local _SID = [=[%s]=]\n\n", compiler.fileName); |
2279 | outputLeaf(out, OM_LUA, compiler.ast); | 2279 | outputLeaf(out, OM_LUA, compiler.ast); |
2280 | fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running. | 2280 | fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running. |
2281 | fprintf(out, "\n--// End of generated code.\n\n"); | 2281 | fprintf(out, "\n--// End of generated code.\n\n"); |