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

another problem in vip :(

mocoba

New Member
Joined
Aug 23, 2008
Messages
332
Reaction score
0
sorry for spamming but i found another problem in vip
PHP:
 [Error - CreatureScript Interface] 
[02/09/2010 15:38:38] data/creaturescripts/scripts/Vip.lua:onLogin
[02/09/2010 15:38:38] Description: 
[02/09/2010 15:38:38] data/creaturescripts/scripts/Vip.lua:5: attempt to index global 'vip' (a nil value)
[02/09/2010 15:38:38] stack traceback:
[02/09/2010 15:38:38] 	data/creaturescripts/scripts/Vip.lua:5: in function <data/creaturescripts/scripts/Vip.lua:2>
[02/09/2010 15:38:38] Admin has logged out.
and cant login
when i delete it i can login but vip erea dont work and when i enter i found another error :S
can anyone help me ?
 
PHP:
-- [( Script edited by: DoidinMapper )] --
function onLogin(cid)
local pos = {x=32360, y=31782, z=7}
pos = {x=32360, y=31782, z=7}
if vip.hasVip(cid) == TRUE then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
elseif vip.hasVip(cid) ~= TRUE and vip.getVip(cid) ~= 0 then
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, pos, TRUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!")
doPlayerSendTextMessage(cid,22,"Your VIP's over!")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid,55555,2)
elseif getPlayerStorageValue(cid,55555) == -1 then
setPlayerStorageValue(cid,55555,2)
end
end
return TRUE
end

will be better if i made doors ?
but how i make vip door ?
 
why is it vip.hasVip(cid)? vip would require a local, but it has none.

try this.

LUA:
-- [( Script edited by: DoidinMapper )] --
function onLogin(cid)
local pos = {x=32360, y=31782, z=7}
	if hasVip(cid) == TRUE then
		if getPlayerStorageValue(cid,55555) ~= 1 then
			setPlayerStorageValue(cid,55555,1)
		end
	elseif hasVip(cid) ~= TRUE and getVip(cid) ~= 0 then
		if getPlayerStorageValue(cid,55555) == 1 then
			doTeleportThing(cid, pos, TRUE)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!")
			doPlayerSendTextMessage(cid,22,"Your VIP's over!")
			setPlayerPromotionLevel(cid, 1)
			setPlayerStorageValue(cid,55555,2)
		elseif getPlayerStorageValue(cid,55555) == -1 then
			setPlayerStorageValue(cid,55555,2)
		end
	end
return TRUE
end
 
PHP:
[02/09/2010 16:08:21] [Error - CreatureScript Interface] 
[02/09/2010 16:08:21] data/creaturescripts/scripts/vip.lua:onLogin
[02/09/2010 16:08:21] Description: 
[02/09/2010 16:08:21] data/creaturescripts/scripts/vip.lua:3: attempt to call global 'hasVip' (a nil value)
[02/09/2010 16:08:21] stack traceback:
[02/09/2010 16:08:21] 	data/creaturescripts/scripts/vip.lua:3: in function <data/creaturescripts/scripts/vip.lua:1>
[02/09/2010 16:08:21] koko elda3ef has logged out.
Still :(
will be better if u tell me how to make vip door
 
when i enter vip erea i found this error
PHP:
[02/09/2010 16:18:54] [Error - MoveEvents Interface] 
[02/09/2010 16:18:54] data/movements/scripts/viptile.lua:onStepIn
[02/09/2010 16:18:54] Description: 
[02/09/2010 16:18:54] data/movements/scripts/viptile.lua:11: attempt to index global 'vip' (a nil value)
[02/09/2010 16:18:54] stack traceback:
[02/09/2010 16:18:54] 	data/movements/scripts/viptile.lua:11: in function <data/movements/scripts/viptile.lua:1>
 
LUA:
-- [( Script edited by: DoidinMapper )] --
function onLogin(cid)
local pos = {x=32360, y=31782, z=7}
pos = {x=32360, y=31782, z=7}
if vip.hasVip(cid) == TRUE then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
elseif vip.hasVip(cid) ~= TRUE and vip.getVip(cid) ~= 0 then
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, pos, TRUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!")
doPlayerSendTextMessage(cid,22,"Your VIP's over!")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid,55555,2)
elseif getPlayerStorageValue(cid,55555) == -1 then
setPlayerStorageValue(cid,55555,2)
end
end
return TRUE
end

will be better if i made doors ?
but how i make vip door ?

lol error was in
LUA:
local pos = {x=32360, y=31782, z=7}
pos = {x=32360, y=31782, z=7}
delete line "pos" not "local pos" and finish i think, i dont got much experience on .lua, but i think this script was wrong
LUA:
-- [( Script edited by: DoidinMapper )] --
function onLogin(cid)
local pos = {x=32360, y=31782, z=7}
pos = {x=32360, y=31782, z=7}
if vip.hasVip(cid) == TRUE then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
elseif vip.hasVip(cid) ~= TRUE and vip.getVip(cid) ~= 0 then
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, pos, TRUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!")
doPlayerSendTextMessage(cid,22,"Your VIP's over!")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid,55555,2)
elseif getPlayerStorageValue(cid,55555) == -1 then
setPlayerStorageValue(cid,55555,2)
end
end
return TRUE
end
 
Back
Top