hedgewars/uScript.pas
changeset 10230 361d36ec5181
parent 10210 1a6b9a98147c
child 10239 ed8bab6e92ba
--- a/hedgewars/uScript.pas	Fri Apr 25 23:17:49 2014 +0400
+++ b/hedgewars/uScript.pas	Mon Apr 28 16:52:00 2014 +0200
@@ -2498,14 +2498,11 @@
     cg : TCapGroup;
 begin
 // initialize lua
-luaState:= lua_open;
-TryDo(luaState <> nil, 'lua_open failed', true);
+luaState:= luaL_newstate();
+TryDo(luaState <> nil, 'luaL_newstate() failed', true);
 
 // open internal libraries
-luaopen_base(luaState);
-luaopen_string(luaState);
-luaopen_math(luaState);
-luaopen_table(luaState);
+luaL_openlibs(luaState);
 
 // import some variables
 ScriptSetString(_S'L', cLocale);