Package fm.ak.server.lua

Source Code of fm.ak.server.lua.luautil

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fm.ak.server.lua;

import fm.ak.server.Main;
import fm.ak.server.sutil;
import org.luaj.vm2.LuaValue;
import org.luaj.vm2.lib.jse.JsePlatform;

/**
* Singleton City
* @author Petre
*/
public class luautil {
   
    final static String LUADIR = "lua";
   
    public static boolean init () {
    String script = LUADIR + "\\sv_init.lua";
        LuaValue _G = JsePlatform.standardGlobals();
        try {
            _G.get("dofile").call(LuaValue.valueOf(script));
           
        } catch (org.luaj.vm2.LuaError ex) {
            Main.ui.commitln("Error: " + ex.getMessage());
            Main.ui.commitln(sutil.ADVICE.REINSTALL.s());
            return true;
        }
        return false;
    }
}
TOP

Related Classes of fm.ak.server.lua.luautil

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.