Elgenady
Veteran OT User
- Joined
- Aug 5, 2011
- Messages
- 1,683
- Solutions
- 36
- Reaction score
- 388
how i can use
fpp.maxTargetDist = 1;
fpp.fullPathSearch = true;
here
when i do get this error
luascript.cpp `fpp' was not declared in this scope
0.4
fpp.maxTargetDist = 1;
fpp.fullPathSearch = true;
here
Code:
int32_t LuaInterface::luaDoChallengeCreature(lua_State* L)
{
//doChallengeCreature(cid, target)
ScriptEnviroment* env = getEnv();
uint32_t targetCid = popNumber(L);
Creature* creature = env->getCreatureByUID(popNumber(L));
if(!creature)
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
return 1;
}
Creature* target = env->getCreatureByUID(targetCid);
if(!target)
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
return 1;
}
target->challengeCreature(creature);
lua_pushboolean(L, true);
return 1;
}
when i do get this error
luascript.cpp `fpp' was not declared in this scope
0.4