Login Error
#1

Hello,i got a error in a command.

Code:
error 017: undefined symbol "string"
error 017: undefined symbol "string"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

4 Errors.
i try to fixed but idk wat the error at.
Code:
            format(string, sizeof(string), "The password you have entered was incorrect. Attempts(%d)", FailLogin[playerid]);
Code:
	format(string, sizeof(string), "%s has been kicked (Failed Logins)",pName(playerid) );
            SendClientMessageToAll(-1, string);
Code:
// Process the login-dialog
Dialog_Login(playerid, response, inputtext[])
{
    switch (response) // Check which button was clicked
    {
        case 1: // Player clicked "Login"
        {
            // Check if the player entered a password
            if (strlen(inputtext) > 0)
            {
                // Check if the entered password is the same as the password saved in the player's account
                if (strcmp(APlayerData[playerid][PlayerPassword], inputtext, false) == 0)
                {
                    APlayerData[playerid][LoggedIn] = true; // The player has logged in properly
                    BankFile_Load(playerid); // Load your bank account (if it exists, the player will be notified about this)
                }
                else
                {
                    SendClientMessage(playerid, 0xFFFFFFFF, TXT_WrongPassword);
                    Kick(playerid);
                }
            }
            else
            {
            new strs[256];
            FailLogin[playerid]++;
            format(string, sizeof(string), "The password you have entered was incorrect. Attempts(%d)", FailLogin[playerid]);
            ShowPlayerDialog(playerid,Dialog_Login,DIALOG_STYLE_INPUT,"Login",strs,"Login","Cancel");
            if(FailLogin[playerid] == MAX_FAIL_LOGINS)
            {
            new string[128];
			format(string, sizeof(string), "%s has been kicked (Failed Logins)",pName(playerid) );
            SendClientMessageToAll(-1, string);
            Kick(playerid);
            }
            }
        }
        case 0: // Player clicked "Cancel"
        {
            // Show a message that the player must be logged in to play on this server
            SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerMustLogin);
            // Kick the player
            Kick(playerid);
        }
    }

    return 1;
}
Reply


Messages In This Thread
Login Error - by DerickClark - 19.04.2013, 02:38
Re: Login Error - by Joshman543 - 19.04.2013, 02:48
Re: Login Error - by DerickClark - 19.04.2013, 10:45
Re: Login Error - by Fredrick - 19.04.2013, 12:14
Re: Login Error - by DerickClark - 19.04.2013, 20:23
Re: Login Error - by zDivine - 19.04.2013, 20:34

Forum Jump:


Users browsing this thread: 1 Guest(s)