So the following code for mysql keeps returning nil even though there is a 1 in the position:
function team_2( ply )
local cpjoin = tmysql.escape( "SELECT CP FROM hl2rp_whitelist WHERE STEAMID = '"..ply:SteamID().."'" ) if cpjoin == 1 then ply:SetTeam( 2 ) else ply:PrintMessage( HUD_PRINTTALK, "You, cannot use the CP class "..ply:SteamID() ) ply:PrintMessage( cpjoin ) end
The steamid is working properly but cpjoin keeps saying it’s a nil value for the printmessage meaning it’s not grabbing 1 out of the slot.
Any help would be appreciated.