Sir Gabriiel
New Member
- Joined
- Mar 24, 2012
- Messages
- 88
- Reaction score
- 2
all the players can log a good ... But one player in particular when trying to login it fails ... He says he accepted the guild and he was relog to get the shield and could no longer log in ...
And when he tries to log the following error appears in the Distro.
[Error - CreatureScript Interface]
data/creaturescripts/scripts/login.luanLogin
Description:
data/creaturescripts/scripts/login.lua:85: attempt to compare string with number
stack traceback:
data/creaturescripts/scripts/login.lua:85: in function <data/creaturescripts/scripts/login.lua:5>
login.lua
And when he tries to log the following error appears in the Distro.
[Error - CreatureScript Interface]
data/creaturescripts/scripts/login.luanLogin
Description:
data/creaturescripts/scripts/login.lua:85: attempt to compare string with number
stack traceback:
data/creaturescripts/scripts/login.lua:85: in function <data/creaturescripts/scripts/login.lua:5>
login.lua
Code:
local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
local text = "This is your first visit in Server. Please choose an outfit."
local useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local lastLogin = getPlayerLastLoginSaved(cid)
if(lastLogin > 0) then
doPlayerSendTextMessage(cid,23, "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. ".")
else
doPlayerSendOutfitWindow(cid)
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "countKill")
registerCreatureEvent(cid, "SaveReportBug")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "kill")
registerCreatureEvent(cid, "reward")
registerCreatureEvent(cid, "recomps")
--registerCreatureEvent(cid, "30")
registerCreatureEvent(cid, "ArenaKill")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "woevip")
registerCreatureEvent(cid, "Receive")
registerCreatureEvent(cid, "castlogin")
registerCreatureEvent(cid, "castlogout")
registerCreatureEvent(cid, "killbossesbroadcast")
registerCreatureEvent(cid, "EndVip")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "zombieevent")
registerCreatureEvent(cid, "Achievements")
registerCreatureEvent(cid, "premcheck")
registerCreatureEvent(cid, "Frags")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "demonOakComplete")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "BountyHunter")
registerCreatureEvent(cid, "Addons")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0)
end
setPlayerStorageValue(cid, 42350, 0)
setPlayerStorageValue(cid, 42352, 0)
registerCreatureEvent(cid, "savePlayer_L")
registerCreatureEvent(cid, "LoginProtection")
doCreatureSetStorage(cid, "loginprotection", os.time())
return true
end