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

rush event error in consola help

Deus Meus

New Member
Joined
May 18, 2014
Messages
120
Reaction score
1
otland Hello I am using a rush event I got for the forum
but it marks an error saying! join rush
Code:
[08/11/2014 02:09:46] [Error - TalkAction Interface]
[08/11/2014 02:09:46] buffer:onSay
[08/11/2014 02:09:46] Description:
[08/11/2014 02:09:46] data/lib/034-exhaustion.lua:8: attempt to compare number with string
[08/11/2014 02:09:46] stack traceback:
[08/11/2014 02:09:46]    data/lib/034-exhaustion.lua:8: in function 'check'
[08/11/2014 02:09:46]    [string "loadBuffer"]:12: in function <[string "loadBuffer"]:3>

any suggestions to fix this error
rush event
https://www.mediafire.com/?1g118bg3t96tmho

I can not post the mod because it passes the
10k caracteres that I leave the link
 
Last edited:
Code:
            configRushEvent = {
                storages = {
                    main = 'rushEventMain', -- set free storage
                    player = 'rushEventPlayer', -- set free storage
                    joining = 'rushEventJoining', -- set free storage
                    b_score = 'rushEventBlueScore', -- set free storage
                    r_score = 'rushEventRedScore', -- set free storage
                    exhaust = 'rushEventExhaust',
                    countEvent = 'rushEventCountEvent'
                },

I think he is saying you need to fix the storage values:
example

Code:
            configRushEvent = {
                storages = {
                    main = 1000, -- set free storage
                    player = 1001, -- set free storage
                    joining = 1002, -- set free storage
                    b_score = 1003, -- set free storage
                    r_score = 1004, -- set free storage
                    exhaust = 20, -- not sure if seconds or miliseconds ( if miliseconds due 20 * 1000)
                    countEvent = 1005
                },
 
It's the storage number. Here you can change the time
Code:
exhaustion.set(cid, configRushEvent.storages.exhaust, 5)
 
.I do not check errors in the console
zxuv4NT.png

not lead me to the waiting area

@BUMP
 
Last edited by a moderator:
I don't see anywhere in the !rush join command that would be teleporting players anywhere.
Is it teleporting you when the event starts?

Code:
<talkaction words="!rush" event="script">
        <![CDATA[
            domodlib("lib_rush_event")
            function onSay(cid, words, param)
                if getStorage(configRushEvent.storages.joining) ~= 1 then
                    return doPlayerSendCancel(cid, 'Rush Event hasn\'t started yet.')
                elseif param == '' then
                    return doPlayerSendCancel(cid, 'Command param required (say: "!rush join" or "!rush leave.").')
                elseif getPlayerLevel(cid) < configRushEvent.players.minLevel then
                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configRushEvent.players.minLevel..' level.')
                elseif getTileInfo(getThingPos(cid)).protection ~= true then
                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
                elseif exhaustion.check(cid, configRushEvent.storages.exhaust) ~= false then
                    return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configRushEvent.storages.exhaust)..' seconds to use this command again.')
                end
                if param == 'join' then
                    if tostring(getCreatureStorage(cid, configRushEvent.storages.player)) ~= '' then
                        return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
                    elseif doCountPlayersRushEvent()[1] == configRushEvent.players.max then
                        return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
                    end
                   
                    for _, v in ipairs(getPlayersOnline()) do
                        if tostring(getCreatureStorage(v, configRushEvent.storages.player)) ~= '' then
                            if getPlayerIp(cid) == getPlayerIp(v) then
                                return doPlayerSendCancel(cid, 'In Rush event there is arleady player who have same ip like you.')
                            end
                        end
                    end
                    doCreatureSetNoMove(cid, true)
                    if configRushEvent.text ~= '' then
                        doPlayerPopupFYI(cid, configRushEvent.text)
                    end
                    doCreatureSetStorage(cid, configRushEvent.storages.player, doCountPlayersRushEvent()[3] >= doCountPlayersRushEvent()[2] and 'blue' or 'red')
                    doAddCondition(cid, createConditionObject(CONDITION_INFIGHT, -1))
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Rush Event. You can\'t move until event don\'t start. Wait patiently for the event start.')
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Rush Event.')
                elseif param == 'leave' then
                    if tostring(getCreatureStorage(cid, configRushEvent.storages.player)) ~= '' then
                        return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
                    end
                    doCreatureSetNoMove(cid, false)
                    doRemoveCondition(cid, CONDITION_INFIGHT)
                    doCreatureSetStorage(cid, configRushEvent.storages.player, '')                   
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Rush Event.')
                end
                exhaustion.set(cid, configRushEvent.storages.exhaust, 5000)
                return true
            end
        ]]>
    </talkaction>
 
Back
Top