lizudus
Www.Xivarian.Com Owner
- Joined
- May 14, 2008
- Messages
- 456
- Reaction score
- 5
I try this script but dont work error
I tryed already doRemovePremium_Points , doRemovePremiumPoints ; getAccountPremium_Points, getAccountPremiumPoints and my database is Premium_Points ( SHOP POINTS )
PHP:
[17:5:43.842] [Error - TalkAction Interface]
[17:5:43.842] data/talkactions/scripts/buyshop.lua:onSay
[17:5:43.842] Description:
[17:5:43.842] data/talkactions/scripts/buyshop.lua:17: attempt to call global 'getAccountPremium_Points' (a nil value)
[17:5:43.842] stack traceback:
[17:5:43.842] data/talkactions/scripts/buyshop.lua:17: in function <data/talkactions/scripts/buyshop.lua:6>
PHP:
local shop =
{
["golden armor"] = {id = 2466, cost = 14, charges = 1, effect = CONST_ME_GIFT_WRAPS},
["pharo sword"] = {id = 2446, cost = 14, charges = 1, effect = CONST_ME_GIFT_WRAPS}
}
function onSay(cid, words, param, channel)
local v = shop[param]
if not v then
doPlayerSendCancel(cid,"Item not found.")
return true
end
local itemm = getItemWeightById(v.id, v.charges)
if getPlayerFreeCap(cid) < itemm then
doPlayerSendCancel(cid, "Sorry, you do not have enough cap.You need "..itemm.." oz to carry : "..param..".")
end
if (getAccountPremium_Points(cid) < v.cost) then
doPlayerSendCancel(cid, "Sorry, you need : "..v.cost.." points to buy this item.")
end
doPlayerAddItem(cid,v.id,v.charges)
doRemovePremium_Points(cid,v.cost)
doSendMagicEffect(getThingPos(cid), v.effect)
return true
end
I tryed already doRemovePremium_Points , doRemovePremiumPoints ; getAccountPremium_Points, getAccountPremiumPoints and my database is Premium_Points ( SHOP POINTS )