• 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 1.X+ tfs 1.5 nekiro 8.6

tibera

Active Member
Joined
Nov 9, 2014
Messages
113
Reaction score
37
Location
Governador Valadares - MG
extended opcode working.

but i got this message in Otclienv8.

ERROR: Unhandled onTextMessage message mode 0: Welcome to {Baiak}!
ERROR: Unhandled onTextMessage message mode 0: Your last visit was on {Sat May 11 13:36:09 2024}.

any know where i fix this in source??
 
Solution
Thank you for reporting this bug... I quickly analyzed the Baiak 1.5 server and noticed that the 'MESSAGE_STATUS_BLUE_LIGHT' function is not in the source code... So, I had to talk to him on Discord, and he made the change. He tested it, and it's functioning perfectly, 100%. See the solution here..

The 'MESSAGE_STATUS_BLUE_LIGHT' function was implemented in the TFS 1.3 8.6 source, and I just adapted it for TFS 1.5. I had forgotten about this in the login.lua file... but everything is OK

look for these lines.
Lua:
   function onLogin(player)
    local loginStr = "Welcome to {" .. configManager.getString(configKeys.SERVER_NAME) .. "}!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."...
extended opcode working.

but i got this message in Otclienv8.

ERROR: Unhandled onTextMessage message mode 0: Welcome to {Baiak}!
ERROR: Unhandled onTextMessage message mode 0: Your last visit was on {Sat May 11 13:36:09 2024}.

any know where i fix this in source??
Search for the string in your server files, for example look for: Your last visit in

Once you find that it will be something like:
Lua:
player:sendTextMessage(MESSAGE_LOGIN, string.format("Your last visit in "

You need to change the MESSAGE_LOGIN to something that is available for your protocol, like maybe MESSAGE_LOOK
 
Thank you for reporting this bug... I quickly analyzed the Baiak 1.5 server and noticed that the 'MESSAGE_STATUS_BLUE_LIGHT' function is not in the source code... So, I had to talk to him on Discord, and he made the change. He tested it, and it's functioning perfectly, 100%. See the solution here..

The 'MESSAGE_STATUS_BLUE_LIGHT' function was implemented in the TFS 1.3 8.6 source, and I just adapted it for TFS 1.5. I had forgotten about this in the login.lua file... but everything is OK

look for these lines.
Lua:
   function onLogin(player)
    local loginStr = "Welcome to {" .. configManager.getString(configKeys.SERVER_NAME) .. "}!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_BLUE_LIGHT, loginStr)
        end
        loginStr = string.format("Your last visit was on {%s}.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_BLUE_LIGHT, loginStr)

change to.
Lua:
function onLogin(player)
    local serverName = configManager.getString(configKeys.SERVER_NAME)
    local loginStr = "Welcome to " .. serverName .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
 
Solution
Thank you for reporting this bug... I quickly analyzed the Baiak 1.5 server and noticed that the 'MESSAGE_STATUS_BLUE_LIGHT' function is not in the source code... So, I had to talk to him on Discord, and he made the change. He tested it, and it's functioning perfectly, 100%. See the solution here..

The 'MESSAGE_STATUS_BLUE_LIGHT' function was implemented in the TFS 1.3 8.6 source, and I just adapted it for TFS 1.5. I had forgotten about this in the login.lua file... but everything is OK

look for these lines.
Lua:
   function onLogin(player)
    local loginStr = "Welcome to {" .. configManager.getString(configKeys.SERVER_NAME) .. "}!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_BLUE_LIGHT, loginStr)
        end
        loginStr = string.format("Your last visit was on {%s}.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_BLUE_LIGHT, loginStr)

change to.
Lua:
function onLogin(player)
    local serverName = configManager.getString(configKeys.SERVER_NAME)
    local loginStr = "Welcome to " .. serverName .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
thank you, problem fixed.
 
Back
Top