[HELP] 3 error (Zh3ro register system)
#1

Код:
public OnPlayerConnect(playerid)
{
        if ( !INI_Exist( pName( playerid ) ) )
               ShowPlayerDialog( playerid, DIALOG_REG_REQ, DIALOG_STYLE_MSGBOX, "{FFFFFF}Password", "{FFFFFF}To play you must register an account!", "Ok", "");
       else

		
			
					SetPVarInt( playerid, "Logged", 1 );
					format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
	        	    INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );



                

        return 1;
}
Error's:
undefined symbol "PlayerFile"
error 017: undefined symbol "PlayerFile"
error 017: undefined symbol "PlayerFile"
Reply
#2

lol that indentation sucks

at top of script
new File:PlayerFile;
Reply
#3

again 3 error

error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
Reply
#4

Under OnPlayerConnect:
pawn Код:
new PlayerFile[13 + MAX_PLAYER_NAME];
Reply
#5

Ok

2 Error:
(919): error 029: invalid expression, assumed zero
(924) : error 001: expected token: ";", but found "-identifier


Код:
public OnPlayerConnect(playerid )
{				new PlayerFile[13 + MAX_PLAYER_NAME];
	            

        if ( !INI_Exist( pName( playerid ) ) )

		

				//The player joined the server automatic register and create file
				format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );



				new
					INI:PlayerAcc = INI_Open( PlayerFile );

                INI_WriteString( PlayerAcc, "NAME",				  pName( playerid )	   );
			 
				INI_WriteInt( PlayerAcc,    "SCORE",              15                   );
				INI_WriteInt( PlayerAcc,    "KILLS",              0                    );
			
				INI_WriteInt( PlayerAcc,    "MY_SKIN",            0                    );
				INI_WriteInt( PlayerAcc,    "MY_TIME",            12                   );
				INI_WriteInt( PlayerAcc,    "MY_WEATHER",         1                    );

				INI_Close( PlayerAcc );





	   else

		
			
				
					format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
	        	    INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );
					SetPVarInt( playerid, "Logged", 1 );


                

        return 1;
}
Reply
#6

Dude ima report you for domestic abuse if you don't stop throwing around your code like that..
Reply
#7

pawn Код:
public OnPlayerConnect(playerid)
{
    new PlayerFile[13 + MAX_PLAYER_NAME];
    if ( !INI_Exist( pName( playerid ) ) )
    {
        //The player joined the server automatic register and create file
        format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
        new
            INI:PlayerAcc = INI_Open( PlayerFile );
        INI_WriteString( PlayerAcc, "NAME",               pName( playerid )    );
        INI_WriteInt( PlayerAcc,    "SCORE",              15                   );
        INI_WriteInt( PlayerAcc,    "KILLS",              0                    );
        INI_WriteInt( PlayerAcc,    "MY_SKIN",            0                    );
        INI_WriteInt( PlayerAcc,    "MY_TIME",            12                   );
        INI_WriteInt( PlayerAcc,    "MY_WEATHER",         1                    );
        INI_Close( PlayerAcc );
    }
    else
    {
        format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
        INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );
        SetPVarInt( playerid, "Logged", 1 );
    }
    return 1;
}
Edit: Not Tested.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)