• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Cant login to my server

Prox Plox

New Member
Joined
Mar 26, 2016
Messages
66
Reaction score
0
When I try to login to my server this happens:

This is what the console tells me:
Code:
[29/03/2016 14:55:06] [Error - GlobalEvent Interface]
[29/03/2016 14:55:06] data/globalevents/scripts/record.lua:onRecord
[29/03/2016 14:55:06] Description:
[29/03/2016 14:55:06] data/globalevents/scripts/record.lua:2: attempt to call field 'executeQuery' (a nil value)
[29/03/2016 14:55:06] stack traceback:
[29/03/2016 14:55:06]     data/globalevents/scripts/record.lua:2: in function <data/globalevents/scripts/record.lua:1>
[29/03/2016 14:55:06] mysql_real_query(): SELECT `vipdays` FROM `accounts` WHERE `id` = 1 LIMIT 1 - MYSQL ERROR: Unknown column 'vipdays' in 'field list' (1054)

[29/03/2016 14:55:06] [Error - CreatureScript Interface]
[29/03/2016 14:55:06] data/creaturescripts/scripts/vipcheck.lua:onLogin
[29/03/2016 14:55:06] Description:
[29/03/2016 14:55:06] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[29/03/2016 14:55:06] stack traceback:
[29/03/2016 14:55:06]     [C]: in function 'error'
[29/03/2016 14:55:06]     data/lib/004-database.lua:60: in function 'getDataInt'
[29/03/2016 14:55:06]     data/lib/050-function.lua:833: in function 'getPlayerVipDays'
[29/03/2016 14:55:06]     data/creaturescripts/scripts/vipcheck.lua:4: in function <data/creaturescripts/scripts/vipcheck.lua:2>

What should I do? :confused:
 
Seems like you have a Vip system which isn't installed correctly. And something with ur record :p

You can just remove the vip system if you don't want it.

Can you post the scripts vipcheck.lua and record.lua?
 
Record.lua
Code:
function onRecord(current, old, cid)
    db.executeQuery("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
    addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end

vipcheck.lua
Code:
-- Extra rates for VIP Players
function onLogin(cid)
  -- local rates = getPlayerRates(cid)
    if getPlayerVipDays(cid) > 1 then
        if getPlayerPromotionLevel(cid) < 1 then
            setPlayerPromotionLevel(cid, 1)
        end      
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have '.. getPlayerVipDays(cid) ..' vip days, enjoy your 35% extra experience, skills and magic level rates!')
    end
        if getPlayerVipDays(cid) == 1 or getPlayerVipDays(cid) == 0 then
            if getPlayerPromotionLevel(cid) == 1 then
                setPlayerPromotionLevel(cid, 0)
            end
        end
    return true
end

Maybe I should get a whole new datapack instead? :p
 
You can try this for record.lua
Code:
function onRecord(current, old, cid)
    db.Query("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
    addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end
 
You can try this for record.lua
Code:
function onRecord(current, old, cid)
    db.Query("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
    addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end
Alright, one step closer! :D
I can now login to the server but I still got this error:
Code:
[29/03/2016 15:27:49] [Error - GlobalEvent Interface]
[29/03/2016 15:27:49] data/globalevents/scripts/record.lua:onRecord
[29/03/2016 15:27:49] Description:
[29/03/2016 15:27:49] data/globalevents/scripts/record.lua:2: attempt to call field 'Query' (a nil value)
[29/03/2016 15:27:49] stack traceback:
[29/03/2016 15:27:49]     data/globalevents/scripts/record.lua:2: in function <data/globalevents/scripts/record.lua:1>
 
Alright, one step closer! :D
I can now login to the server but I still got this error:
Code:
[29/03/2016 15:27:49] [Error - GlobalEvent Interface]
[29/03/2016 15:27:49] data/globalevents/scripts/record.lua:onRecord
[29/03/2016 15:27:49] Description:
[29/03/2016 15:27:49] data/globalevents/scripts/record.lua:2: attempt to call field 'Query' (a nil value)
[29/03/2016 15:27:49] stack traceback:
[29/03/2016 15:27:49]     data/globalevents/scripts/record.lua:2: in function <data/globalevents/scripts/record.lua:1>
db.query not Query
 
Back
Top