• 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 Error Vocation Vip

hasbro

Member
Joined
Feb 15, 2009
Messages
286
Reaction score
6
Well I made this script for when the player has vip day> one vocation he turn the vip, and when you have your days vips <0, he returned to his vocation.

PHP:
My Error:
[Error - Lua Interface::loadfile] data/creturescripts/scripts/VocationVip.lua:3:  unexpected symbol near '>'

My Script VocationVIp.lua
PHP:
function onLogin(cid)
 
if getPlayerVipDays(cid,>1)= TRUE then
 if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then  
doPlayerAddVocation(cid,getPlayerVocation(cid)+4)
end
if getPlayerVipDays(cid,<1)= then
if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then
doPlayerAddVocation(cid,getPlayerVocation(cid)+4)
end
end
return true
end
 
what the fuck..
LUA:
function onLogin(cid) 
if getPlayerVipDays(cid) > 1 and (isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then  
doPlayerSetVocation(cid, (getPlayerVocation(cid)+4))
end
if getPlayerVipDays(cid) < 1 and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid, (getPlayerVocation(cid)+4))
end
return true
end
 
Last edited:
Thanks for help me

New error:
LUA:
data/creturescripts/scripts/VocationVip.lua:onlogin
Description:
data/creturescripts/scripts/VocationVip.lua:3: attempt to call global 'doPlayerAddVocation' <a nil value>
stack traceback:
data/creturescripts/scripts/VocationVip.lua:3: in function <data/creturescripts/scripts/VocationVip.lua:1>
 
Back
Top