12.04.2012, 10:46
I was making a registeration system using dini, and I had a dialog for "register and login", and case 1 is login.
pawn Код:
if(dialogid == DIALOG_REGISTER)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
if(playerV[playerid][Pass] != 0) {
SendClientMessage(playerid, GREY, "You already have an account!");
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_LIST, "Registeration || Login", "Register\nLogin", "Proceed", "Cancel");
}
else if(playerV[playerid][Pass] == 0) {
ShowPlayerDialog(playerid, DIALOG_NEWACC, DIALOG_STYLE_PASSWORD, "Registeration!", "Please enter a password to register your account with!", "Proceed", "Cancel");
}
case 1: // Line 340
{
new
file[128],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
format(file, sizeof(file), "%s.ini", name);
if(!fexist(file))
SendClientMessage(playerid, GREY, "You do not have an account!");
ShowPlayerDialog(playerid, DIALOG_NEWACC, DIALOG_STYLE_PASSWORD, "Registeration!", "Please enter a password to register your account with!", "Proceed", "Cancel");
else if(fexist(file))
playerV[playerid][Skin] = dini_Int(file, "Skin");
playerV[playerid][IsLSPD] = dini_Int(file, "IsLSPD");
}
}
}
}
}
pawn Код:
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : warning 217: loose indentation
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : error 014: invalid statement; not in switch
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : warning 215: expression has no effect
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : error 001: expected token: ";", but found ":"
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : error 029: invalid expression, assumed zero
C:\Users\Jack\Desktop\Server\Lf-Rp.pwn(340) : fatal error 107: too many error messages on one line