Dialog Issues
#1

Error
Код:
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1443) : error 017: undefined symbol "DIALOG_BASE"
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1447) : error 017: undefined symbol "pPass"
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1447) : warning 215: expression has no effect
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1447) : error 001: expected token: ";", but found "]"
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1447) : error 029: invalid expression, assumed zero
C:\Users\Robert\Desktop\Server Bundle\gamemodes\crpnew.pwn(1447) : fatal error 107: too many error messages on one line

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


5 Errors.
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) //the callback
{
  if (dialogid == DIALOG_BASE + 1) //checking dialogid
  {
    if (response == 1) //making sure "Login" was pressed
    {
      if (!strcmp(inputtext, pPass[playerid])) //checking if it is the players password
      {
        LoginPlayer(playerid); //calling a function to log him in
      }
      else //incorrect password
      {
        ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, "Invalid Password", "Invalid Password, try again", "Login", "Cancel"); //shows another dialog, with the same dialogid.
        LogAttempts[playerid]++; //increments a variable to know how many time he has tried to login
        if (LogAttempts[playerid] >=2) //is it greater then or equal to 2?
        {
          SendClientMessage(playerid, 0xFFFFFFFF, "Too many attempts, bye!"); //tells him what is about to happen
          SetTimerEx("kicker", 200, 0, "i", playerid); //if you can't figure out what this is, see below
        }
      }
    }
    else //pressed "Cancel"
    {
      SendClientMessage(playerid, 0xFFFFFFFF, "well if you aren't going to login, LEAVE"); //some message
      SendClientMessage(playerid, 0xFFFFFFFF, "okay, i will do it for you."); //another
      SetTimerEx("kicker", 200, 0, "i", playerid); //a timer that allows the player to see the messages before he is kicked.
    }
    return 1; //returns 1, it has been handled
  }
  return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) //the callback
{
  if (dialogid == DIALOG_BASE + 1) //checking dialogid
  {
    if (response == 2) //making sure "Login" was pressed
    {
      if (!strcmp(inputtext, pPass[playerid])) //checking if it is the players password
      {
        RegisterPlayer(playerid); //calling a function to register him
      }

      }
    }
    else //pressed "Cancel"
    {
      SendClientMessage(playerid, 0xFFFFFFFF, "well if you aren't going to register, LEAVE"); //some message
      SendClientMessage(playerid, 0xFFFFFFFF, "okay, i will do it for you."); //another
      SetTimerEx("kicker", 200, 0, "i", playerid); //a timer that allows the player to see the messages before he is kicked.
    }
    return 1; //returns 1, it has been handled
  }
  return 0;
}
Reply


Messages In This Thread
Dialog Issues - by robert4049 - 22.07.2010, 05:32
Re: Dialog Issues - by Lorenc_ - 22.07.2010, 06:22
Re: Dialog Issues - by robert4049 - 22.07.2010, 07:29
Re: Dialog Issues - by (SF)Noobanatior - 22.07.2010, 07:35
Re: Dialog Issues - by robert4049 - 22.07.2010, 07:36
Re: Dialog Issues - by Billy_Macan - 22.07.2010, 08:49
Re: Dialog Issues - by robert4049 - 22.07.2010, 20:40

Forum Jump:


Users browsing this thread: 1 Guest(s)