Error 029: invalid expression, assumed zero
#1

Код:
C:\Users\David\Desktop\derp\gamemodes\SNRP.pwn(956) : error 029: invalid expression, assumed zero
C:\Users\David\Desktop\derp\gamemodes\SNRP.pwn(956) : warning 215: expression has no effect
C:\Users\David\Desktop\derp\gamemodes\SNRP.pwn(956) : error 001: expected token: ";", but found "return"
C:\Users\David\Desktop\derp\gamemodes\SNRP.pwn(1618) : warning 203: symbol is never used: "HospitalTimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Here's the code:
PHP код:
if(response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD"Supernatural Roleplay - Register","You have entered an invalid password.\nType a valid password below to register a new account.","Register","Quit");
                   new 
hashpass[129];
                
WP_Hash(hashpass,sizeof(hashpass),inputtext);
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File"Account Data");
                
INI_WriteString(File"Password"hashpass);
                
DefaultRegistrationVariables(playerid);
                
INI_Close(File);
                else return 
ShowPlayerDialog(playeridDIALOG_CREATION_1DIALOG_STYLE_INPUT"Age""How old is your character?""Next""Quit");//956
            

I've tried fixing it, but can't seem to do so, I've stressed myself for a few hours now trying to find a solution, but nothing works
Reply
#2

try this

pawn Код:
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Supernatural Roleplay - Register","You have entered an invalid password.\nType a valid password below to register a new account.","Register","Quit");
    else
    {
        new hashpass[129];
        WP_Hash(hashpass,sizeof(hashpass),inputtext);
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File, "Account Data");
        INI_WriteString(File, "Password", hashpass);
        DefaultRegistrationVariables(playerid);
        INI_Close(File);
        ShowPlayerDialog(playerid, DIALOG_CREATION_1, DIALOG_STYLE_INPUT, "Age", "How old is your character?", "Next", "Quit");//956
    }
    return 1;
}
Reply
#3

pawn Код:
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Supernatural Roleplay - Register","You have entered an invalid password.\nType a valid password below to register a new account.","Register","Quit");
    new hashpass[129];
    WP_Hash(hashpass,sizeof(hashpass),inputtext);
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File, "Account Data");
    INI_WriteString(File, "Password", hashpass);
    DefaultRegistrationVariables(playerid);
    INI_Close(File);
    else // There's no (IF) statement before this else.
    return
    ShowPlayerDialog(playerid, DIALOG_CREATION_1, DIALOG_STYLE_INPUT, "Age", "How old is your character?", "Next", "Quit");//956
}
Reply
#4

Fixed, thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)