• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

SetCombatFormula question

SirTitan

Member
Joined
May 4, 2008
Messages
262
Reaction score
9
Location
Germany/Dortmund
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?

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;
	}
 

Similar threads

Replies
2
Views
557
Back
Top