[HELP] y_ini register dialog error - path
#3

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Don't use #define for DIALOG ID to avoid ID collusion,
instead, I suggest that you use
PHP код:
enum {
    
DIALOG_REGISTER,
    
DIALOG_LOGIN ,
    
DIALOG_SUCCESS_1, 
    
DIALOG_SUCCESS_2
} 
you typed this
PHP код:
stock UserPath(playerid)
{
new 
string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return 
string;
} 
*please remove that and change it to
PHP код:
UserPath(playerid)
{
new 
string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return 
string;
} 
also change this
PHP код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); 
to this
PHP код:
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid); 
finally if you want to set a tag to the data-holding file use this

PHP код:
INI_SetTag(File, "data"): 
You're wrong, there's nothing to do with UserPath, like there's no difference if you use stock keyword. It won't change anything if you'll remove it, stock keyword just tells the compiler to ignore the unused function warnings, but the function stays the same. Stock keyword is not needed here though.

Also you were wrong with INI_ParseFile, you can't replace player's id with "data", it won't work.

By the way, are you sure you've got the things defined on the top of the gamemode? You could've forgot to define them.
Reply


Messages In This Thread
[HELP] y_ini register dialog error - path - by Valleh - 05.10.2016, 10:35
Re: [HELP] y_ini register dialog error - path - by Eoussama - 05.10.2016, 11:49
Re: [HELP] y_ini register dialog error - path - by GoldenLion - 05.10.2016, 14:18
Re: [HELP] y_ini register dialog error - path - by Valleh - 05.10.2016, 14:48
Re: [HELP] y_ini register dialog error - path - by GoldenLion - 05.10.2016, 15:29
Re: [HELP] y_ini register dialog error - path - by Valleh - 05.10.2016, 15:44
Re: [HELP] y_ini register dialog error - path - by Eoussama - 05.10.2016, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)