AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DBI mysql help (https://forums.alliedmods.net/showthread.php?t=76713)

LefEx 08-29-2008 05:18

DBI mysql help
 
Hi, i am new to amxmodx plugins and now i have a problem.. I hope someone can help.

get_user_authid(iArrPlayers[iID], sSteamID, MAX_MESSAGE_SIZE-1)
res = dbi_query(sqlConn, "SELECT username FROM users WHERE steamid='%s'", sArg)

if (dbi_num_rows(res) > 0){
SendMessage("[Check] Your Steam ID is already registered", iArrPlayers[iID])
new err[255]
new errNum = dbi_error(sqlConn, err, 254)
server_print("SteamReg: %s|%d", err, errNum)
dbi_close(sqlConn)
return 1
}

I get the error:
L 08/29/2008 - 11:17:39: [MySQL] Invalid DBI result handle 0
L 08/29/2008 - 11:17:39: [AMXX] Displaying debug trace (plugin "bh-reg.amxx")
L 08/29/2008 - 11:17:39: [AMXX] Run time error 10: native error (native "dbi_num_rows")
L 08/29/2008 - 11:17:39: [AMXX] [0] php4C5kui.sma::AuthPlayer (line 112)
L 08/29/2008 - 11:17:39: [AMXX] [1] php4C5kui.sma::SayHandler (line 55)


All times are GMT -4. The time now is 03:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.