Exedion
Active Member
- Joined
- Jun 11, 2007
- Messages
- 629
- Reaction score
- 30
i try to make this function but dont work and no show error in console, why?
[cpp]
int32_t LuaInterface::luaDoCreatureCancelFollow(lua_State* L)
{
//doCreatureCancelFollow(cid)
ScriptEnviroment* env = getEnv();
if(Creature* creature = env->getCreatureByUID(popNumber(L)))
{
creature->setFollowCreature(NULL);
lua_pushboolean(L, true);
}
else
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}
[/cpp]
[cpp]
int32_t LuaInterface::luaDoCreatureCancelFollow(lua_State* L)
{
//doCreatureCancelFollow(cid)
ScriptEnviroment* env = getEnv();
if(Creature* creature = env->getCreatureByUID(popNumber(L)))
{
creature->setFollowCreature(NULL);
lua_pushboolean(L, true);
}
else
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}
[/cpp]