SirTitan
Member
Why the setCombatFormul lua function says that it: "This function can only be used while loading the script."
if i make comment around the if, so i can modify it anytime while server is running, can it cause crashes????
Can someone please answer, why its made so it will load only on startup?
if i make comment around the if, so i can modify it anytime while server is running, can it cause crashes????
Can someone please answer, why its made so it will load only on startup?
Code:
int32_t LuaScriptInterface::luaSetCombatFormula(lua_State* L)
{
//setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
ScriptEnviroment* env = getEnv();
if(env->getScriptId() != EVENT_ID_LOADING)
{
errorEx("This function can only be used while loading the script.");
lua_pushboolean(L, false);
return 1;
}