Tem uma parte errada la...
nt LuaScriptInterface::luaDoChangeTeleportPos(lua_State *L)
{
//doChangeTeleportPos(uid,newpos)
Position pos;
uint32_t stackpos;
popPosition(L, pos, stackpos);
uint32_t uid = popNumber(L);
ScriptEnviroment* env = getScriptEnv();
Thing* tmp = env->getThingByUID(uid);
Teleport* tp = NULL;
if(tmp)
tp = tmp->getItem()->getTeleport();
if(tp){
tp->setDestPos(pos);
lua_pushnumber(L, LUA_NO_ERROR);
}
else{
reportErrorFunc(getErrorDesc(LUA_ERROR_THING_NOT_FOUND));
lua_pushnumber(L, LUA_ERROR);
}
return 1;
}
O correto é
int LuaScriptInterface::luaDoChangeTeleportPos(lua_State *L)
{
//doChangeTeleportPos(uid,newpos)
Position pos;
uint32_t stackpos;
popPosition(L, pos, stackpos);
uint32_t uid = popNumber(L);
ScriptEnviroment* env = getScriptEnv();
Thing* tmp = env->getThingByUID(uid);
Teleport* tp = NULL;
if(tmp)
tp = tmp->getItem()->getTeleport();
if(tp){
tp->setDestPos(pos);
lua_pushnumber(L, LUA_NO_ERROR);
}
else{
reportErrorFunc(getErrorDesc(LUA_ERROR_THING_NOT_FOUND));
lua_pushnumber(L, LUA_ERROR);
}
return 1;
}
Tem so nt
o certo eh int