• 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!

Lua Zombie Event Error

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
135
Location
Sweden
Trying to set up Zombie Event for 8.6 (1.3)
Get this error..
Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/zombie_event/zombie_think.lua:onThink
LuaScriptInterface::luaItemSetAttribute(). Attempt to set protected key "uid"
stack traceback:
        [C]: in function 'setAttribute'
        data/globalevents/scripts/zombie_event/zombie_think.lua:7: in function <data/globalevents/scripts/zombie_event/zombie_think.lua:3>
Zombie Event has started & waiting for players to join! Min: 1/5.

Lua:
dofile('data/zombie_system.lua')

function onThink(interval, lastExecution, thinkInterval)
    if Game.getStorageValue(zeStartedGlobalStorage) < 1 then
        local teleport = Game.createItem(1387, 1, zeCreateTeleportPosition)
        if teleport then
            teleport:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 7000)
        end
        Game.setStorageValue(zeStartedGlobalStorage, 1)
        print('Zombie Event has started & waiting for players to join! Min: '.. zeMinPlayers ..'/'.. zeMaxPlayers ..'.')
        Game.broadcastMessage('The Zombie Event has started! You have '.. zeWaitMinutes ..' minutes to join!', MESSAGE_STATUS_WARNING)
        addEvent(startZombie, zeWaitMinutes * 60 * 1000)
    end
    return true
end
 
Back
Top