--- a/hedgewars/uScript.pas Thu Aug 26 14:46:30 2010 +0100
+++ b/hedgewars/uScript.pas Thu Aug 26 16:02:09 2010 +0200
@@ -780,6 +780,7 @@
ScriptSetInteger('LandAdds', cLandAdditions);
ScriptSetInteger('Explosives', cExplosives);
ScriptSetInteger('Delay', cInactDelay);
+ScriptSetInteger('Ready', cReadyDelay);
ScriptSetInteger('SuddenDeathTurns', cSuddenDTurns);
ScriptSetString('Map', '');
ScriptSetString('Theme', '');
@@ -805,6 +806,7 @@
ParseCommand('map ' + ScriptGetString('Map'), true);
if ScriptGetString('Theme') <> '' then
ParseCommand('theme ' + ScriptGetString('Theme'), true);
+cReadyDelay:= ScriptGetInteger('Ready');
if ScriptExists('onAmmoStoreInit') then
begin
@@ -821,7 +823,10 @@
begin
ret:= luaL_loadfile(luaState, Str2PChar(name));
if ret <> 0 then
- LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')')
+ begin
+ LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')');
+ LuaError('Lua: ' + lua_tostring(luaState, -1));
+ end
else
begin
WriteLnToConsole('Lua: ' + name + ' loaded');