Raised This Month: $ Target: $400
 0% 

FileExist or in Mysql number exist


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BloodyNuker
Member
Join Date: Jan 2006
Old 03-28-2006 , 12:30  
Reply With Quote #7

I have this when i compile

/home/users/amxmodx/tmp3/textAS0JHb.sma(34) : error 017: undefined symbol "player_ip"
/home/users/amxmodx/tmp3/textAS0JHb.sma(34 -- 35) : error 088: number of arguments does not match definition
/home/users/amxmodx/tmp3/textAS0JHb.sma(35) : error 017: undefined symbol "result"
/home/users/amxmodx/tmp3/textAS0JHb.sma(35) : fatal error 107: too many error messages on one line


Code:
#include <amxmodx> 
#include <dbi> 


new Sql:dbc 

// Start of plugin 
public plugin_init() { 
register_plugin("IP player registered?","1.0","ACA") 
register_cvar("amx_aca_host","host") 
register_cvar("amx_aca_user","username") 
register_cvar("amx_aca_pass","password") 
register_cvar("amx_aca_db","dbname") 
set_task(1.0,"start_sql") 
} 


//Create a connection 
public start_sql() 
{ 
new host[32], username[32], password[32], dbname[32], error[32] 
get_cvar_string("amx_aca_host",host,32) 
get_cvar_string("amx_aca_user",username,32) 
get_cvar_string("amx_aca_pass",password,32) 
get_cvar_string("amx_aca_db",dbname,32) 
dbc = dbi_connect(host,username,password,dbname,error,32) 
if (dbc == SQL_FAILED) 
{ 
server_print("[ACA] Disconnected") 
} 
else 
{ 
server_print("[ACA] Connected") 
dbi_query(dbc,"SELECT * FROM `myTable` WHERE `myColumn` = '%s'", player_ip) 
if(result >= RESULT_OK) 
{ 
client_print(id,print_chat,"The IP are registered in DATA BASE") 
} 
else { 
client_print(id,print_chat,"The IP are not registered in DATA BASE") 
} 

}
BloodyNuker is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:42.


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