Improve compatibility with lua 5.2.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.lib.jse.JsePlatform;
|
||||
|
||||
@@ -10,8 +11,8 @@ public class SampleJseMain {
|
||||
String script = "examples/lua/hello.lua";
|
||||
|
||||
// create an environment to run in
|
||||
LuaValue _G = JsePlatform.standardGlobals();
|
||||
_G.get("dofile").call( LuaValue.valueOf(script) );
|
||||
Globals _G = JsePlatform.standardGlobals();
|
||||
_G.loadFile(script).arg1().call( LuaValue.valueOf(script) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user