I have a problem with this part of the system, any solution?
part of the erro:
line 21: local creature = tile:getTopCreature()
part of the erro:
PHP:local players = {} for x = dg[choiceId].FromPos.x, dg[choiceId].ToPos.x do for y = dg[choiceId].FromPos.y, dg[choiceId].ToPos.y do for z = dg[choiceId].FromPos.z, dg[choiceId].ToPos.z do local tile = Tile(x, y, z) local creature = tile:getTopCreature() if creature and creature:isPlayer() then players[#players+1] = creature end end end end
[2022-31-05 16:45:04.500] [error] Lua script error: /home/global/data/scripts/custom/dungeos_creature.lua:callback
[2022-31-05 16:45:04.500] [error] /home/global/data/scripts/custom/dungeos_creature.lua:21: attempt to index local 'tile' (a nil value)
stack traceback:
[C]: in function '__index'
/home/global/data/scripts/custom/dungeos_creature.lua:21: in function </home/worldglobal/data/scripts/custom/dungeos_creature.lua:3>