Hello , doesnt work to log in , when i open char list and press enter this message cames :
This is my login script
I use 0.3.6
PHP:
[26/04/2010 22:07:21] Sorcerer Sample has logged in.
[26/04/2010 22:07:21] mysql_real_query(): SELECT `auction_balance` FROM `players` WHERE `id` = 3; - MYSQL ERROR: Unknown column 'auction_balance' in 'field list' (1054)
[26/04/2010 22:07:21] [Error - CreatureScript Interface]
[26/04/2010 22:07:21] data/creaturescripts/scripts/login.lua:onLogin
[26/04/2010 22:07:21] Description:
[26/04/2010 22:07:21] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[26/04/2010 22:07:21] stack traceback:
[26/04/2010 22:07:21] [C]: in function 'error'
[26/04/2010 22:07:21] data/lib/004-database.lua:60: in function 'getDataInt'
[26/04/2010 22:07:21] data/creaturescripts/scripts/login.lua:23: in function <data/creaturescripts/scripts/login.lua:5>
[26/04/2010 22:07:22] Sorcerer Sample has logged out.
This is my login script
PHP:
local config = {
loginMessage = getConfigValue('loginMessage')
}
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
local auction = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")
if(auction:getDataInt("auction_balance") > 0) then
doPlayerAddMoney(cid, auction:getDataInt("auction_balance"))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You sold item on auction, you get " .. auction:getDataInt("auction_balance") .. " gps.")
db.executeQuery("UPDATE `players` SET `auction_balance` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
auction:free()
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "Monster_Weapon_Upgrade")
return true
end
I use 0.3.6