• 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!

Lua VIP Nil Value

hallabackkid101

New Member
Joined
Feb 7, 2009
Messages
100
Reaction score
0
Location
Georgia, Usa
My engine is saying that VIP has nil value on this script. Can someone help?

Code:
function onLogin(cid)

local setPlayerLevelOnLogin = 150
local setPlayerLevelOnLoginVIP = 160

if(getPlayerLevel(cid) < 150) and vip.getVip(cid) >= 1 then
doPlayerAddExperience(cid, (getExperienceForLevel(setPlayerLevelOnLoginVIP) - getPlayerExperience(cid)))
doPlayerSendTextMessage(0, cid, 22, "Go kill someone!")
else
doPlayerAddExperience(cid, (getExperienceForLevel(setPlayerLevelOnLogin) - getPlayerExperience(cid)))
doPlayerSendTextMessage(0, cid, 22, "Go kill someone!")
end
return TRUE
end
 
Last edited by a moderator:
[05/12/2013 11:17:58] [Error - CreatureScript Interface]
[05/12/2013 11:17:58] data/creaturescripts/scripts/lowlevellock.lua:eek:nLogin
[05/12/2013 11:17:58] Description:
[05/12/2013 11:17:59] data/creaturescripts/scripts/lowlevellock.lua:6: attempt to index global 'vip' (a nil value)
[05/12/2013 11:17:59] stack traceback:
[05/12/2013 11:17:59] data/creaturescripts/scripts/lowlevellock.lua:6: in function <data/creaturescripts/scripts/lowlevellock.lua:1>
 

Similar threads

Back
Top