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

Error when using the castle book

vitinhoo96

New Member
Joined
Jun 24, 2020
Messages
2
Reaction score
0
Please can someone help me

I use OTX server



I have an error that when using the book, to see which guild has the castle domain, an error appears

error that appears
LUA:
[4/5/2022 15:5:29] [Error - Action Interface]
[4/5/2022 15:5:29] data/actions/scripts/events/realCastle.lua:onUse
[4/5/2022 15:5:29] Description:
[4/5/2022 15:5:29] data/actions/scripts/events/realCastle.lua:3: attempt to concatenate a boolean value
[4/5/2022 15:5:29] stack traceback:
[4/5/2022 15:5:29]     data/actions/scripts/events/realCastle.lua:3: in function <data/actions/scripts/events/realCastle.lua:1>

this is the script that tells where the error is
LUA:
function onUse(cid, item, frompos, item2, topos)
    if item.uid == 61466 then
        local guild = getGlobalStorageValue(realCastle.guild_storage) > 1 and "a guild "..getGuildNameByID(getGlobalStorageValue(realCastle.guild_storage)).." possui o dominio" or "nenhuma guild possui o dominio do castelo"
        local sto = realCastle.date_storages
        local gsto = getGlobalStorageValue
        local time = gsto(sto[1]).."/"..gsto(sto[2]).."/"..gsto(sto[3])
        local domain = realCastle.isOpen() and "as guilds estao batalhando pelo dominio do castelo" or guild
        local msg = " --------[CASTLE]-------\n\n\nAtualmente "..domain..".\n\nProxima batalha: "..time.." as 21:00."
        doShowTextDialog(cid,8977,msg)
        return true
    end
    if not realCastle.isOpen() then
        doTeleportThing(cid,getTownTemplePosition(1))
        return true
    end
    if not realCastle.isDominating(cid) then
        realCastle.domain(cid)
        doSendMagicEffect(getThingPos(cid), CONST_ME_CRAPS)
    else
        doPlayerSendCancel(cid,"Sua guild ja esta com o dominio do castelo.")
    end
    return true
end
 
Back
Top