11.04.2017, 13:50
Hi, I have a problem with making a script with MySQL r41 and mysql_inline.
I'm trying to make a script to check the player has an account or not.
And when I call mysql_tquery_inline after restart the server, It's not working and not checking the account. But, If I call mysql_tquery without inline after restart, It's working and checking the account perfectly.
What should I do to solve this problem?
Here's the code.
I'm trying to make a script to check the player has an account or not.
And when I call mysql_tquery_inline after restart the server, It's not working and not checking the account. But, If I call mysql_tquery without inline after restart, It's working and checking the account perfectly.
What should I do to solve this problem?
Here's the code.
Код:
stock CheckAccount(playerid) { new name[MAX_PLAYER_NAME], query[120] ; GetPlayerName(playerid, name, MAX_PLAYER_NAME); mysql_format(g_SQL, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Username` = '%e' LIMIT 1", name); inline OnAccountDataLoaded() { if(cache_num_rows() > 0) { cache_get_value(0, "Password", Player[playerid][Pass], 65); cache_get_value(0, "Salt", Player[playerid][Salt], 17); ShowPlayerLoginDialog(playerid); } else { ShowPlayerRegisterDialog(playerid); } } mysql_tquery_inline(g_SQL, query, using inline OnAccountDataLoaded, ""); return 1; }