From 13c0366d3865bfd8830c5851c66ec834c2e83aba Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 12 Feb 2012 00:06:44 +1000 Subject: SID is now full path to the LSL file. Still need to change it to the UUID of the running script. --- LuaSL/src/LSL.lua | 5 ++--- 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) end end; -function LSL.mainLoop(ourSID, x) - local sid = ourSID .. ".events" +function LSL.mainLoop(sid, x) local status, errorMsg = luaproc.newchannel(sid) local result - SID = ourSID + SID = sid if not status then 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) fprintf(out, "local _bit = require(\"bit\")\n"); fprintf(out, "local _LSL = require(\"LSL\")\n\n"); // TODO - Use the scripts UUID instead of the file name here, or something. - fprintf(out, "local _SID = [=[%s.lua.out]=]\n\n", compiler.fileName); + fprintf(out, "local _SID = [=[%s]=]\n\n", compiler.fileName); outputLeaf(out, OM_LUA, compiler.ast); fprintf(out, "\n\n_LSL.mainLoop(_SID, _defaultState)\n"); // This actually starts the script running. fprintf(out, "\n--// End of generated code.\n\n"); -- cgit v1.1