Code:
function onSay(cid, words, param)
if(words == "/vip")then
accountName = getPlayerAccount(cid)
if(isSilverVip(accountName))then
time1 = getSilverVipTime(accountName)
if(time1 > 0)then
doPlayerSendTextMessage(cid, 19, "Sua conta tem "..timeString(time1).." de Silver VIP.")
else
doPlayerSendTextMessage(cid, 19, "Sua conta tem Vip Gratis.")
end
else
doPlayerSendTextMessage(cid, 19, "Voce nao tem dias VIP.")
end
elseif(isGoldVip(accountName))then
time2 = getGoldVipTime(accountName)
if(time2 > 0)then
doPlayerSendTextMessage(cid, 19, "Sua conta tem "..timeString(time2).." of Gold VIP.")
end
else
doPlayerSendTextMessage(cid, 19, "Sua conta tem VIP Gratis.")
end
else
doPlayerSendTextMessage(cid, 19, "Voce nao tem dias VIP.")
end
end
return true
end
data/talkactions/scripts/vip.lua:23: 'end' expected (to close 'function' at line 1) near 'else'
Cannot load script (data/talkactions/scripts/vip.lua)
data/talkactions/scripts/vip.lua:23: 'end' expected (to close 'function' at line 1) near 'else'
I tryed to put ends everywhere, nothing works! I cant understand >.< Help Please!