Skip to content
Snippets Groups Projects
Commit 9ab60d12 authored by wolfs's avatar wolfs
Browse files

Add LUA_EvalMath to Lua with function name EvalMath

parent eb5b99bc
Branches
Tags
No related merge requests found
...@@ -85,6 +85,13 @@ static int lib_print(lua_State *L) ...@@ -85,6 +85,13 @@ static int lib_print(lua_State *L)
return 0; return 0;
} }
static int lib_evalMath(lua_State *L)
{
const char *word = luaL_checkstring(L, 1);
lua_pushinteger(L, LUA_EvalMath(word));
return 1;
}
// M_RANDOM // M_RANDOM
////////////// //////////////
...@@ -1633,6 +1640,7 @@ static int lib_gTicsToMilliseconds(lua_State *L) ...@@ -1633,6 +1640,7 @@ static int lib_gTicsToMilliseconds(lua_State *L)
static luaL_Reg lib[] = { static luaL_Reg lib[] = {
{"print", lib_print}, {"print", lib_print},
{"EvalMath", lib_evalMath,},
// m_random // m_random
{"P_Random",lib_pRandom}, {"P_Random",lib_pRandom},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment