--- a/hedgewars/uScript.pas Wed May 07 19:26:05 2014 +0200
+++ b/hedgewars/uScript.pas Wed May 07 22:47:54 2014 +0200
@@ -2498,11 +2498,14 @@
cg : TCapGroup;
begin
// initialize lua
-luaState:= luaL_newstate();
-TryDo(luaState <> nil, 'luaL_newstate() failed', true);
+luaState:= lua_open;
+TryDo(luaState <> nil, 'lua_open failed', true);
// open internal libraries
-luaL_openlibs(luaState);
+luaopen_base(luaState);
+luaopen_string(luaState);
+luaopen_math(luaState);
+luaopen_table(luaState);
// import some variables
ScriptSetString(_S'L', cLocale);