Sami_san
New Member
- Joined
- May 20, 2016
- Messages
- 76
- Reaction score
- 1
Hello i have this premium scroll script that on use gives premium points to the ots shop but when i run the server i get an error of db.executeQuery nill value
local points = 30 -- amount of premium points
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 10 Premium Point")
doRemoveItem(item.uid)
end
return true
end
local points = 30 -- amount of premium points
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 10 Premium Point")
doRemoveItem(item.uid)
end
return true
end