02.01.2011, 18:36
Hi,I have a problem with my MySQL registration/login system.When a player connects,registers instead of inserting the player's name in field 'Name'(MYSQL Database) it inserts a number...I don't know what's the problem and what I am doing wrong.
Heres my MySQLCreateAccount:
Heres my MySQLCreateAccount:
Code:
public MySQLCreateAccount(newplayersname[], newpassword[]) { new query[128]; new sqlplyname[MAX_PLAYER_NAME]; new sqlpassword[64]; samp_mysql_real_escape_string(newplayersname, sqlplyname); samp_mysql_real_escape_string(newpassword, sqlpassword); format(query, sizeof(query), "INSERT INTO players (Name, Password) VALUES ('%s', '%s')", sqlplyname, sqlpassword); samp_mysql_query(query); new newplayersid = MySQLCheckAccount(newplayersname); if (newplayersid != 0) { return newplayersid; } return false; }