• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua index nill value

For exemple: tronEvent, .

219s4e0.jpg
 
again you haven't posted the script
how am i expected to help you if i can't see line 177?


Code:
function tronEvent.onPlayerDeath(self, player, killerId)
    -- Clear the field of this tron
    local arenaPosition = config.position.arenaPosition
    for x = arenaPosition.fromPosition.x, arenaPosition.toPosition.x do
        for y = arenaPosition.fromPosition.y, arenaPosition.toPosition.y do
            for z = arenaPosition.fromPosition.z, arenaPosition.toPosition.z do
                local tile = Tile(x, y, z)
                if tile then
                    for _, item in ipairs(tile:getItems()) do
                        -- Remove the fields
                        if item:getType():getType() == ITEM_TYPE_MAGICFIELD then
                            if item:getId() == self.color[self:getPlayerColor(player)].field then
                                item:remove()
                            end
                        end
                    end
                end
            end
        end
    end
 
Back
Top