Ataro
Member
Sorry, Had to be deleted
Last edited:
function doRemovePremiumPoints(accountName, points)
points = tostring(points)
return db.executeQuery('UPDATE `accounts` SET `premium_points` = `premium_points` -' .. points .. ' WHERE `name` = ' .. accountName .. ' LIMIT 1;')
end
function CurrentPoints(accountName)
playerpoints = db.getResult('SELECT `premium_points` FROM `accounts` WHERE `name` = ' .. accountName .. ' LIMIT 1;')
return playerpoints:getDataInt("premium_points")
end
function doRemovePremiumPoints(accountName, points)
points = tostring(points)
return db.executeQuery('UPDATE `accounts` SET `premium_points` = `premium_points` -' .. points .. ' WHERE `name` = ' .. db.escapeString(accountName) .. ' LIMIT 1;')
end
function CurrentPoints(accountName)
playerpoints = db.getResult('SELECT `premium_points` FROM `accounts` WHERE `name` = ' .. db.escapeString(accountName) .. ' LIMIT 1;')
return playerpoints:getDataInt("premium_points")
end
because you don't using " ' " in ur account name : )@PhoOwned
2. Sometimes error can occur. ????
Well i never do get an error
no its not the same... i tested it with both... in rev3952, db.execute~ doesnt work@up
Same
It'd occur that error only when it's removing points from account that contains a letter/string as you're not using " "well, i ddint knew it was so bad .... its my fucking first script :S
@PhoOwned
2. Sometimes error can occur. ????
Well i never do get an error
function doRemovePremiumPoints(accountName, points)
points = tostring(points)
return db.executeQuery('UPDATE `accounts` SET `premium_points` = `premium_points` -' .. points .. ' WHERE `name` = [B]' .. db.escapeString(accountName) .. '[/B] LIMIT 1;')
end
function doRemovePremiumPoints(accountName, points)
points = tostring(points)
return db.executeQuery('UPDATE `accounts` SET `premium_points` = `premium_points` -' .. points .. ' WHERE `name` = [B]"' .. db.escapeString(accountName) .. '"[/B] LIMIT 1;')
end