• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

VIP remove days

imback1

Unknown member
Joined
Jul 11, 2013
Messages
785
Solutions
1
Reaction score
46
Hello
i got problem with my vip system when system check time to remove day to a player i found error and didn't remove anything
globalevents.xml
Code:
    <globalevent name="checkvip" interval="20" script="removevipdays.lua"/>
    <globalevent name="removevip" interval="30" script="removevip.lua"/>
removevipdays.lua
Code:
function onTimer(cid, item, fromPosition, toPosition)

    for _, name in ipairs(getOnlinePlayers()) do
        local player = getPlayerByName(name)
        if getPlayerStorageValue(player,11551) > 1 then
            setPlayerStorageValue(player,11551,getPlayerStorageValue(player) - 1)
        end
    end
end
removevip.lua
Code:
function onThink(cid, item, fromPosition, toPosition)

    for _, name in ipairs(getOnlinePlayers()) do
        local player = getPlayerByName(name)
        if getPlayerStorageValue(player,11551) == 1 then
            setPlayerStorageValue(player,11551,0)
        end
    end
end
and when system check players i found these errors
[25/12/2014 16:59:15] [Error - GlobalEvent Interface]
[25/12/2014 16:59:15] data/globalevents/scripts/removevipdays.lua:eek:nThink
[25/12/2014 16:59:15] Description:
[25/12/2014 16:59:15] (luaGetCreatureStorage) Creature not found

[25/12/2014 16:59:16] [Error - GlobalEvent Interface]
[25/12/2014 16:59:16] data/globalevents/scripts/removevipdays.lua:eek:nThink
[25/12/2014 16:59:16] Description:
[25/12/2014 16:59:16] data/globalevents/scripts/removevipdays.lua:6: attempt to perform arithmetic on a boolean value
[25/12/2014 16:59:16] stack traceback:
[25/12/2014 16:59:16] data/globalevents/scripts/removevipdays.lua:6: in function <data/globalevents/scripts/removevipdays.lua:1>
[25/12/2014 16:59:16] [Error - GlobalEvents::think] Couldn't execute event: checkvip
and when i check removevip i found this
[25/12/2014 17:01:39] [Error - GlobalEvents::think] Couldn't execute event: removevip
please help me with it >.< btw this is vip system which i use
http://otland.net/threads/vip-system.19426/
@Limos
@Printer
@Ninja
@StreamSide
@imkingran
 
afffffff i can't believe it, isn't there anyone can fix this script? ! to work with online/offline players to lose vip days? 0,0 :mad: (ontimer not interval)
 
You should do VIP by account, if you do it by accounts then you can use queries and it will work better. The VIP system that you decided to use is not that great in my opinon.
Use this one: http://otland.net/threads/the-best-vip-system-ever-action-movevent-globalevent.71638/
i choosed mine cuz it's got storagevalue and i've made many things depends on this storage and i liked it cuz i will make 2 vip 1 for free and 1 for donaters btw i prefer vip for one char only not for all characters on same account
 
Back
Top