{
// Container(uid)
uint32_t id = getNumber<uint32_t>(L, 2);
Container* container = getScriptEnv()->getContainerByUID(id);
if (container) {
pushUserdata(L, container);
setMetatable(L, -1, "Container");
} else {
lua_pushnil(L);
}
return 1;
}
Tá caindo no else, e a função está retornando nil, para o script lua...









info
Grupo: Cavaleiro
Registrado: 30/11/15
Posts: 174
Reputação: +52
Char no Tibia: Takeiflexa Saikoreno
Instalei o reward chest no meu ot ,porem quando mato o boss o item vem normal ,porem da esse erro no tfs ,e tbm não consigo mover o reward container ,ja mudei em todo lugar e ele não move .
Alguem poderia me dar um suporte de como resolver .
Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/rewardchest.lua:onKill data/creaturescripts/scripts/rewardchest.lua:282: attempt to call method 'getCon tentDescription' (a nil value) stack traceback: [C]: in function 'getContentDescription' data/creaturescripts/scripts/rewardchest.lua:282: in function 'doBossRew ard' data/creaturescripts/scripts/rewardchest.lua:300: in function <data/crea turescripts/scripts/rewardchest.lua:295> Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/rewardchest.lua:onKill data/creaturescripts/scripts/rewardchest.lua:282: attempt to call method 'getCon tentDescription' (a nil value) stack traceback: [C]: in function 'getContentDescription' data/creaturescripts/scripts/rewardchest.lua:282: in function 'doBossRew ard' data/creaturescripts/scripts/rewardchest.lua:300: in function <data/crea turescripts/scripts/rewardchest.lua:295>as linha que dão o erro são essas
str = str .. Container(rewardBag):getContentDescription() else str = str .. 'nothing' end else str = str .. 'nothing (due to low stamina)' end player:sendTextMessage(MESSAGE_INFO_DESCR, str .. '.') end end addEvent(doSaveReward, REWARD_CHEST.DECAY[monster:getName():lower()]*1000, corpse:getUniqueId(), MonsterType(monster:getName()):getNameDescription()) end function onKill(creature, target) if (Monster(target) ~= nil) and isInArray(REWARD_CHEST.BOSSES, target:getName():lower()) then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) corpse:decay() target:setDropLoot(false) doBossReward(target, corpse) end end