hi,
ill try to write my own plugin but im not sure about the code and it wont compile ... some errors in line 26. i downt know anything about small and the code but i hope it isent all false what i have written.
my try is a stats output for psychostats to lern and understand the code.
i hope some one will help me
Code:
#include <amxmodx>
#include <amxmisc>
#include <dbi>
#define mysql_host "127.0.0.1"
#define mysql_user "user"
#define mysql_pass "pass"
#define mysql_db "psychostats"
public CheckMySats(id)
{
new authid[34], username[65], rank[10]
get_user_authid ( id, authid, 33 )
get_user_name ( id, username, 65 )
dbi_connect ( mysql_host, mysql_user, mysql_pass, mysql_db )
dbi_query ( "SELECT rank FROM pstats_plr WHERE wordid='%s'", authid )
if( dbi_query == RESULT_FAILED )
client_print(id,print_chat,"[STATS] You are not RANKED yet!", username )
return PLUGIN_HANDLED
dbi_field( dbi_query, rank, 10 )
client_print( id, print_chat, "[STATS] %s is RANK %s", username, rank )
dbi_close()
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin( "Statstest", "0.0.1", "myownhand" )
register_clcmd( "say /rank", "CheckMySats" )
return PLUGIN_CONTINUE
}
and the error line 26 is this part
Code:
dbi_field( dbi_query, rank, 10 )
thanks