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

Last man standing error

wikutag

SoulBound 8.6 100% custom
Joined
Dec 27, 2012
Messages
305
Reaction score
0
Location
United states Kentucky
Hello

Im currently using tfs 1.0

I get this error from the last man standing event it doesnt broadcast

heres where i got it from :https://otland.net/threads/last-man-standing-event-tfs-1-x-1-0-1-1.224516/

2qibnyf.png

Code:
 Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
Line 30 and heres the whole thing
Code:
dofile('data/lmsLib.lua')

local function sendReminderLMSEvent()
    Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
end

function onThink(interval, lastExecution)
    if #Game.getPlayers() < lmsConfigTable.minPlayers then --Min players is not online, we stop event from executing
        return true
    end

    if not Game.getStorageValue(lmsStatesTable.EVENT_STATE_STORAGE) then
        Game.setStorageValue(lmsStatesTable.EVENT_STATE_STORAGE, lmsStatesTable.EVENT_STATE_CLOSED)
    end

    if Game.getStorageValue(lmsStatesTable.EVENT_STATE_STORAGE) ~= lmsStatesTable.EVENT_STATE_CLOSED then
        return true
    end

    local teleportTile = Tile(lmsTeleportTable.createTeleportPosition):getItemById(lmsTeleportTable.teleportId)
    if not teleportTile then
        local teleport = Game.createItem(lmsTeleportTable.teleportId, 1, lmsTeleportTable.createTeleportPosition)
        if teleport then
            teleport:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, lmsTeleportTable.teleportUid)
        end
    end

    Game.setStorageValue(lmsStatesTable.EVENT_STATE_STORAGE, lmsStatesTable.EVENT_STATE_INIT)
    Game.setStorageValue(lmsConfigTable.joinedCountStorage, 0)
    Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
    addEvent(startLMSEvent, lmsConfigTable.waitingMinutes * 60 * 1000)
    addEvent(sendReminderLMSEvent, (lmsConfigTable.waitingMinutes / 2) * 60 * 1000)
    return true
end
 
Last edited:
It would appear Game.broadcastMessage is not a thing. Try to comment it out and see if that is the only error? I haven't futzed around with 1.0 much but maybe see if doBroadcastMessage exists in some sort of compat.lua or something similar. If it does, check and see how it handles the broadcast then change it in your script.
 
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/lmsStartEvent.lua:eek:nThink
LuaScriptInterface::luaItemSetAttribute(). Attempt to set protected key "uid"
stack traceback:
[C]: in function 'setAttribute'
data/globalevents/scripts/lmsStartEvent.lua:24: in function <data/globalevents/scripts/lmsStartEvent.lua:7>
i get this error im using TFS 1.2

Lua:
   local teleportTile = Tile(lmsTeleportTable.createTeleportPosition):getItemById(lmsTeleportTable.teleportId)
    if not teleportTile then
        local teleport = Game.createItem(lmsTeleportTable.teleportId, 1, lmsTeleportTable.createTeleportPosition)
        if teleport then
            teleport:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, lmsTeleportTable.teleportUid)
        end
    end
 
Back
Top