Misokoko
New Member
- Joined
- Mar 29, 2013
- Messages
- 126
- Reaction score
- 0
hey guys i hope can someone help with i got a script to get points on site from the lever when i use th lever i got this error in console :
and didn't recieved my points on site i hope someone could help me
my tfs 0.4 and my script ezay
Code:
[18:1:52.710] mysql_real_query(): UPDATE `accounts` set `premium_points` = `premium_points` + '5' WHERE `account_id` = 'okaoka'; - MYSQL ERROR: Unknown column 'account_id' in 'where clause' (1054)
my tfs 0.4 and my script ezay
Code:
-- by andu @ otland.net
local position = {x = 992, y = 1000, z = 7, stackpos = 1} -- position to put the items on
local donationItems = {
[1] = {itemid = 2456, points = 5},
[2] = {itemid = 8904, points = 5},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 10029 or item.itemid == 10030 then
local thing, check = getThingFromPos(position), 0
for i = 1, #donationItems do
if thing.itemid == donationItems[i].itemid then
if doRemoveItem(thing.uid, 1) then
doPlayerSendTextMessage(cid,22,"You have returned your donated item '"..getItemNameById(donationItems[i].itemid).."' and added "..donationItems[i].points.." points to your current one.")
db.query("UPDATE `accounts` set `premium_points` = `premium_points` + '"..donationItems[i].points.."' WHERE `account_id` = '"..getPlayerAccount(cid).."';")
doPlayerSendCancel(cid, "You received " ..donationItems[i].points.. " point(s).")
else
doPlayerSendCancel(cid, "Could not remove the item.")
end
check = 1
end
end
if check == 0 then
doPlayerSendCancel(cid, "Donation item not found.")
end
doTransformItem(item.uid, item.itemid - ((item.itemid - 10029) * 2) + 1) -- this is beauty of math, by andu (a - ((a - 10) * 2) + 1)
end
return true
end