require( “mysqloo” )
function GivePointsCommand( args )
local db = mysqloo.connect( ) function db:onConnected() print("GivePoints: MySQL Connected!") db:wait() local q = self:query("UPDATE pointshop_data SET points=points+" .. args .. " WHERE steamid='" .. args .. "'") function q:onSuccess( data ) print("GivePoints: Points given.") end function q:onError( err, sql ) print("GivePoints: Error!") print("Query:", sql ) print("Error:", err ) end function db:onConnectionFailed( err ) print("GivePoints: Connection to DB failed!") print("Error:", err) end end
concommand.Add( “ps_givepoints”, GivePointsCommand )
The problem I am having with this is when I run the command, it prints nothing to the server console, and the query doesn’t get ran. However, there are no errors either. It just returns nothing.
The command I was running: ps_givepoints STEAM_0:1:19050040 1000
If you guys could help me out that would be great.