10.06.2012, 18:26
Im getting error when i compile script
Line 969 to 1018:
pawn Код:
error 030: compound statement not closed at the end of file (started at line 969)
pawn Код:
if (dialogid == 1)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Your account is not registered", "Password:", "Register", "Leave");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "Admin",PlayerInfo[playerid][pAdmin] = 0);
dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills] = 0);
dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths] = 0);
dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted] = 0);
format(string, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", name, inputtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
gPlayerLogged[playerid] = 1;
}
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Account is Registered", "Password:", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid,COLOR_RED, "Wrong Password.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Account is Registered", "Password", "Login", "Leave");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdmin] = dini_Int(file, "Admin");
PlayerInfo[playerid][pKills] = dini_Int(file, "Kills");
PlayerInfo[playerid][pDeaths] = dini_Int(file, "Deaths");
PlayerInfo[playerid][pMuted] = dini_Int(file, "Muted");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
SendClientMessage(playerid, COLOR_RED, "[SYSTEM]: Successfully logged in!");
}
return 1;
}