• 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+ Creaturescripts login/logout error logs

platano

Active Member
Joined
Jul 21, 2009
Messages
156
Solutions
1
Reaction score
37
Location
Mexico
Hello otland it's me, banana, again.

I downloaded Nekiro's downgrade 7,72 of TFS 1.3

Compiled without errors and currently using MYAAC v0.8.0

When I try to login to the game some logs appear on the server console, I was thinking about using another datapacks scripts and get it working via trial and error but I wanted to know if someone knew what's going on in here before trying to bruteforce this bug lol

I can't login to the game and there's some error logs on the console related to creaturescripts

Code:
Knight Sample has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.lua:onLogin
data/creaturescripts/scripts/login.lua:16: attempt to index global 'nextUseStaminaTime' (a nil value)
stack traceback:
        [C]: in function '__newindex'
        data/creaturescripts/scripts/login.lua:16: in function <data/creaturescripts/scripts/login.lua:1>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/logout.lua:onLogout
data/creaturescripts/scripts/logout.lua:3: attempt to index global 'nextUseStaminaTime' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/logout.lua:3: in function <data/creaturescripts/scripts/logout.lua:1>
Knight Sample has logged out.
Zore has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/login.lua:onLogin
data/creaturescripts/scripts/login.lua:16: attempt to index global 'nextUseStaminaTime' (a nil value)
stack traceback:
        [C]: in function '__newindex'
        data/creaturescripts/scripts/login.lua:16: in function <data/creaturescripts/scripts/login.lua:1>

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/logout.lua:onLogout
data/creaturescripts/scripts/logout.lua:3: attempt to index global 'nextUseStaminaTime' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/logout.lua:3: in function <data/creaturescripts/scripts/logout.lua:1>
Zore has logged out.
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 1,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 0,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`maglevel` = 0,`mana` = 100,`manamax` = 100,`manaspent` = 0,`s
Message: Out of range value for column 'onlinetime' at row 1
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 1,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 0,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`maglevel` = 0,`mana` = 100,`manamax` = 100,`manaspent` = 0,`s
Message: Out of range value for column 'onlinetime' at row 1
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 1,`group_id` = 3,`vocation` = 0,`health` = 100,`healthmax` = 100,`experience` = 0,`lookbody` = 10,`lookfeet` = 10,`lookhead` = 10,`looklegs` = 10,`looktype` = 136,`maglevel` = 0,`mana` = 100,`manamax` = 100,`manaspent` = 0,`s
Message: Out of range value for column 'onlinetime' at row 1
Error while saving player: Zore
 
Remove everything regarding nextUseStamina in these files.

data/creaturescrips/scripts/login.lua
data/creaturescrips/scripts/logout.lua

should be like this:

login.lua
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_DEFAULT, 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_DEFAULT, loginStr)

    -- Promotion
    local vocation = player:getVocation()
    local promotion = vocation:getPromotion()
    if player:isPremium() then
        local value = player:getStorageValue(STORAGEVALUE_PROMOTION)
        if not promotion and value ~= 1 then
            player:setStorageValue(STORAGEVALUE_PROMOTION, 1)
        elseif value == 1 then
            player:setVocation(promotion)
        end
    elseif not promotion then
        player:setVocation(vocation:getDemotion())
    end

    -- Events
    player:registerEvent("PlayerDeath")
    player:registerEvent("DropLoot")
    return true
end

logout.lua
Lua:
function onLogout(player)
    return true
end
 
Okay boi thanks a lot, there's like other tons of bugs that keep showing up I'll see how much I can actually delete without breaking up this distro xD
 
Back
Top