I have this script that has this "vipstatus = getPlayerStorageValue(cid,storageValue)". My question is where is the "vipstatus" value stored?
TFS version is 0.3.6 Build 3429
Here is the script, and another one that has the same "getPlayerStorageValue" and the number "21444"
I dont know if this is a problem with a missing table in the database because I dont get any errors that apear related to it, only this one
Here are the scripts:
Thanks!
TFS version is 0.3.6 Build 3429
Here is the script, and another one that has the same "getPlayerStorageValue" and the number "21444"
I dont know if this is a problem with a missing table in the database because I dont get any errors that apear related to it, only this one
Code:
mysql_real_query(): SELECT `id`, `ownerid`, `creationdata`, `checkdata` FROM `guilds` WHERE `world_id` = 0; - MYSQL ERROR: Unknown column 'checkdata' in 'field list' (1054)
Here are the scripts:
Code:
function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)
if vipstatus == 1 then
doTransformItem(item.uid, item.itemid + 1)
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 0)
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
doMoveCreature(cid, 1)
elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 2)
doMoveCreature(cid, 2)
elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
doMoveCreature(cid, 3)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 4)
doMoveCreature(cid, 2)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 5)
doMoveCreature(cid, 2)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 6)
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 7)
doMoveCreature(cid, 0)
end
else
doCreatureSay(cid, "You are not a VIP.", TALKTYPE_ORANGE_1)
end
return 1
end
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5785 then
if (getPlayerStorageValue(cid,21444) < 1) then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,21444,1)
doSendMagicEffect(playerpos, 29)
doCreatureSay(cid, "Congrats! You now own the VIP acces token", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "You already are a VIP", TALKTYPE_ORANGE_1)
end
end
end
Thanks!