Quote:
Originally Posted by Richie©
You can do it this way;
pawn Code:
CheckAccountExists(account[]) { new string[128]; format(string, sizeof(string), "SELECT * FROM player_accounts WHERE Name = '%s'", account); mysql_function_query(dbHandle, string, true, "CheckAccount", "s", account); }
forward CheckAccount(account[]); public CheckAccount(account[]) { new rows, fields; cache_get_data(rows, fields); if(!rows) { // account does not exist, register? } else { //proceed to login? } return 1; // To clear cache }
If you want to do it the 'old' way, without CheckAccount callback, you can try y_inline which is supported in R31.
|
The problem I have are:
*First of all, I am updating from R5 to R7
*I have used if(CheckAccountExists(...))
How do make change to the code without effecting these ifs??
Thanks