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

TFS 0.X server crash


Active Member
Dec 4, 2017
Reaction score
Using tfs 0.4 rev 3777. I have doOpenChannel on my server so whenever a player close a channel that I don't want them to close it is reopened and it works fine most of the times, but if I'm online and someone logs into my char (that will kick me), that other person will log in without any channels open, and if I try to log in again before the other guy logs out the server will crash, probably because it is trying to open the channel, the channel isn't opening and then the server doesn't know what to do

I tried stuff like isPlayer(cid) to see if the guy is already online or not, tried a lot of stuff actually but I don't know what to do, how can I create a try catch or something like that? when oppenChannel fails I need to just return true and let the player go without the chat

this is my script
    if not isPlayer(cid) or not isInArray(not_close_this,channel) then return true end

    doPlayerOpenChannel(cid, channel)
and this is the source code

don't evne know if it makes sense but I tried if doPlayerOpenChannel(cid, channel) and it didn't amount to nothing so I don't even think I can try that kind of stuff
Post automatically merged:

I think that if these was a way to check if channel x is open something like
doOpenchannel (cid, x)
if not isOpenChannel(cid, x) then return true end
would fix?? maybe idk but I don't know if it is possible to check which channels are open
the crash sometimes not happen when pure ctrl + g, doing it a few times and then killing players so they relog makes it happen, it is very weird
Post automatically merged:

fixed! setted a storage on login and onLogout to y and compare then when trying to open a channel
Last edited: