mail[Wesnoth-commits] r34045 - /trunk/src/scripting/lua.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on March 22, 2009 - 19:59:
Author: silene
Date: Sun Mar 22 19:59:44 2009
New Revision: 34045

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34045&view=rev
Log:
Fixed reporting on syntax error.

Modified:
    trunk/src/scripting/lua.cpp

Modified: trunk/src/scripting/lua.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/scripting/lua.cpp?rev=34045&r1=34044&r2=34045&view=diff
==============================================================================
--- trunk/src/scripting/lua.cpp (original)
+++ trunk/src/scripting/lua.cpp Sun Mar 22 19:59:44 2009
@@ -639,7 +639,9 @@
        int res = luaL_loadstring(L, prog);
        if (res)
        {
-               std::cerr << "Syntax error while loading Lua script.\n";
+               std::cerr << "Failure while loading Lua script: "
+                         << lua_tostring(L, -1) << '\n';
+               lua_pop(L, 1);
                return;
        }
 




Related Messages


Powered by MHonArc, Updated Sun Mar 22 20:00:30 2009