Registration.
#1

My registration is bugged, everything is okay other than this... As when I remove it I get no errors.

pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Here are my errors.

error 017: undefined symbol "UserPath"
error 017: undefined symbol "UserPath"
error 017: undefined symbol "DIALOG_LOGIN"
error 001: expected token: "-string end-", but found "-identifier-"
fatal error 107: too many error messages on one line
Reply
#2

Quote:
Originally Posted by mkmk
Посмотреть сообщение
My registration is bugged, everything is okay other than this... As when I remove it I get no

error 017: undefined symbol "UserPath"
error 017: undefined symbol "UserPath"
error 017: undefined symbol "DIALOG_LOGIN"
error 001: expected token: "-string end-", but found "-identifier-"
fatal error 107: too many error messages on one line
No, it's not bugged.
The compiler clearly states that your script doesn't have a UserPath function defined, also it doesn't have DIALOG_LOGIN defined.
Reply
#3

No is defined 'UserPath' and 'DIALOG_LOGIN' can't be clearer
Reply
#4

add this function above ur mode
pawn Код:
stock UserPath(playerid)
{
    new string_path[ 128 ],player_name[ MAX_PLAYER_NAME ];

    GetPlayerName( playerid, player_name, MAX_PLAYER_NAME );
    format( string_path, sizeof ( string_path ), "%s.ini ", player_name);
//you can change it to your account directory ex:"Accounts\%s.ini"
    return string_path;
}
EDIT:forgot to close the statement "[/pawn]"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)