vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i have problem with this script
I was try add new points, i have new collumn in database "new_points" in players section but it dont adding points after use item... But in console i have error
I dont understand mysql so i try edit a premium points rune but i need add points only for one character not account
Code:
local cfg = {
points = 1,
effect = CONST_ME_GIFT_WRAPS
}
function onUse(cid, item, fromPosition, itemEx, toPosition, name)
if not isPlayer(cid) then
return false
end
db.executeQuery("UPDATE 'players' SET 'new_point' = 'new_point + 1' WHERE 'name' = '.. getCreatureName(cid)..''';")
doCreatureSay(cid, "+1", TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, cfg.effect)
doRemoveItem(item.uid, 1)
return true
end
I was try add new points, i have new collumn in database "new_points" in players section but it dont adding points after use item... But in console i have error
Code:
[20:32:48.432] mysql_real_query(): UPDATE 'players' SET 'new_point' = 'new_point + 1' WHERE 'name' = '.. getCreatureName(cid)..'''; - MYSQL ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''players' SET 'new_point' = 'new_point + 1' WHERE 'name' = '.. getCreatureName(cid)...' at line 1 (1064)
I dont understand mysql so i try edit a premium points rune but i need add points only for one character not account