22.07.2010, 05:32
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;
}

