diff options
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 0a194a8..80eda62 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -1636,7 +1636,7 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state | |||
1636 | } | 1636 | } |
1637 | else if (OM_LUA == mode) | 1637 | else if (OM_LUA == mode) |
1638 | { | 1638 | { |
1639 | fprintf(file, "_LSL.stateChange(_"); | 1639 | fprintf(file, "return _LSL.stateChange(_"); |
1640 | if (statement->identifier.text) | 1640 | if (statement->identifier.text) |
1641 | outputText(file, &(statement->identifier), TRUE); | 1641 | outputText(file, &(statement->identifier), TRUE); |
1642 | fprintf(file, "State)"); | 1642 | fprintf(file, "State)"); |
@@ -2277,7 +2277,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants) | |||
2277 | fprintf(out, "local _bit = require(\"bit\")\n"); | 2277 | fprintf(out, "local _bit = require(\"bit\")\n"); |
2278 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); | 2278 | fprintf(out, "local _LSL = require(\"LSL\")\n\n"); |
2279 | outputLeaf(out, OM_LUA, compiler.ast); | 2279 | outputLeaf(out, OM_LUA, compiler.ast); |
2280 | fprintf(out, "\n\n_LSL.stateChange(_defaultState)\n"); // This actually starts the script running. | 2280 | fprintf(out, "\n\n_LSL.mainLoop(_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"); |
2282 | fclose(out); | 2282 | fclose(out); |
2283 | 2283 | ||