[POMOC] Dialog za registraciju(eror)

Započeo [CH]Ivan_Lukic, Decembar 26, 2010, 13:43:43 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Evo taj eror
D:\Los Angeles RolePlay 3.0 Fixable Versione\Los Angeles RolePlay 3.0 Fixable Versione\gamemodes\larp.pwn(45209) : error 030: compound statement not closed at the end of file (started at line 45098)


Ubacivo sam dialog za registraciju  odavde  http://balkan-samp.com/forum/index.php?topic=8671.0

to di je eror je ondialogrespone


ovako 45209 to ej kraj mod nema te linije zadnja je linija 45208 a vidim da pise started at line 45098 pa eto od te cu pa do kraja



if(RegistrationStep[playerid] == 3)
       {
          if(response)
          {
             if(listitem == 0)
             {
                 PlayerInfo[playerid][pOrigin] = 1;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 1)
             {
                 PlayerInfo[playerid][pOrigin] = 2;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 2)
             {
                 PlayerInfo[playerid][pOrigin] = 3;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
                 if(listitem == 3)
             {
                 PlayerInfo[playerid][pOrigin] = 4;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 4)
             {
                 PlayerInfo[playerid][pOrigin] = 5;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 5)
             {
                 PlayerInfo[playerid][pOrigin] = 6;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 6)
             {
                 PlayerInfo[playerid][pOrigin] = 7;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 7)
             {
                 PlayerInfo[playerid][pOrigin] = 8;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 8)
             {
                 PlayerInfo[playerid][pOrigin] = 9;
                 RegistrationStep[playerid] = 0;
            PlayerInfo[playerid][pTut] = 1;
            MedicBill[playerid] = 0;
            SetPlayerSpawn(playerid);
            TogglePlayerControllable(playerid, 1);
            SafeGivePlayerMoney(playerid, 500);
               return 0;
             }
             if(listitem == 9)
             {
                               Kick(playerid);
             }
            }
      }
   
      return 0;

cristiane

Pa to ti ide pod public OnDialogResponse ako nemas taj callback stavis na kraju moda al moras i callback dodati ispred toga pise ti na tut-u ovako:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
         new string[128];
         if(dialogid == 3)
{
    if(RegistrationStep[playerid] == 1)
    {
    if(response)
    {
if(listitem == 0)
        {
        PlayerInfo[playerid][pSex] = 1;
        ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n11 \n19 \n20 \n21 \n22 \n23 \n24 \n25 \n26 \n27 \n28 \n29 \n30 \n31 \n32 \n33 \n34 \n35 \nVise od 35", "U redu", "Odustani");
        new maleskin;
    maleskin = random(sizeof(CivMalePeds));
    SetPlayerSkin(playerid, maleskin);
    PlayerInfo[playerid][pChar] = maleskin;
        RegistrationStep[playerid] = 2;
    }
    if(listitem == 1)
    {
        PlayerInfo[playerid][pSex] = 2;
        ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n11 \n19 \n20 \n21 \n22 \n23 \n24 \n25 \n26 \n27 \n28 \n29 \n30 \n31 \n32 \n33 \n34 \n35", "U redu", "Odustani");
            new femaleskin;
    femaleskin = random(sizeof(CivFemalePeds));
    SetPlayerSkin(playerid, femaleskin);
    SetPlayerSkin(playerid, femaleskin);
    PlayerInfo[playerid][pChar] = femaleskin;
        RegistrationStep[playerid] = 2;
    }
    if(listitem == 2) // Kick
    {
        Kick(playerid);
    }
     }
              }
      return 1;
        }
if(dialogid == 4)
{
        if(RegistrationStep[playerid] == 2)
    {
            if(response)
    {
            if(listitem == 0)
    {
        PlayerInfo[playerid][pAge] = 9;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 1)
    {
        PlayerInfo[playerid][pAge] = 10;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 2)
    {
        PlayerInfo[playerid][pAge] = 11;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 3)
    {
        PlayerInfo[playerid][pAge] = 12;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 4)
    {
        PlayerInfo[playerid][pAge] = 13;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 5)
    {
        PlayerInfo[playerid][pAge] = 14;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 6)
    {
        PlayerInfo[playerid][pAge] = 15;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
                            }
    if(listitem == 7)
    {
        PlayerInfo[playerid][pAge] = 16;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 8)
    {
        PlayerInfo[playerid][pAge] = 17;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 9)
    {
        PlayerInfo[playerid][pAge] = 18;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 10)
    {
        PlayerInfo[playerid][pAge] = 19;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 11)
    {
        PlayerInfo[playerid][pAge] = 20;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
                            if(listitem == 12)
    {
        PlayerInfo[playerid][pAge] = 21;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 13)
    {
        PlayerInfo[playerid][pAge] = 22;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 14)
    {
        PlayerInfo[playerid][pAge] = 23;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 15)
    {
        PlayerInfo[playerid][pAge] = 24;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 16)
    {
        PlayerInfo[playerid][pAge] = 25;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 17)
    {
        PlayerInfo[playerid][pAge] = 26;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 18)
    {
        PlayerInfo[playerid][pAge] = 27;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 19)
    {
        PlayerInfo[playerid][pAge] = 28;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 20)
    {
        PlayerInfo[playerid][pAge] = 29;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 21)
    {
        PlayerInfo[playerid][pAge] = 30;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 22)
    {
        PlayerInfo[playerid][pAge] = 31;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 23)
    {
        PlayerInfo[playerid][pAge] = 32;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 24)
    {
        PlayerInfo[playerid][pAge] = 33;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 25)
    {
        PlayerInfo[playerid][pAge] = 34;
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Bosna i Hercegovina \nSrbija \nCrnaGora \nHrvatska \nMakedonija \nSlovenija \nGrcka \nAlbanija \nKosovo", "U redu", "Odustani");
        RegistrationStep[playerid] = 3;
                    }
                    if(listitem == 26)
    {
                                Kick(playerid);
    }
      }
}
return 1;
}
if(dialogid == 5)
{
    if(RegistrationStep[playerid] == 3)
    {
    if(response)
    {
    if(listitem == 0)
    {
        PlayerInfo[playerid][pOrigin] = 1;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 1)
    {
        PlayerInfo[playerid][pOrigin] = 2;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 2)
    {
        PlayerInfo[playerid][pOrigin] = 3;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
        if(listitem == 3)
    {
        PlayerInfo[playerid][pOrigin] = 4;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 4)
    {
        PlayerInfo[playerid][pOrigin] = 5;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 5)
    {
        PlayerInfo[playerid][pOrigin] = 6;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 6)
    {
        PlayerInfo[playerid][pOrigin] = 7;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 7)
    {
        PlayerInfo[playerid][pOrigin] = 8;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 8)
    {
        PlayerInfo[playerid][pOrigin] = 9;
        RegistrationStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
MedicBill[playerid] = 0;
SetPlayerSpawn(playerid);
TogglePlayerControllable(playerid, 1);
SafeGivePlayerMoney(playerid, 500);
    return 0;
    }
    if(listitem == 9)
    {
                               Kick(playerid);
    }
      }
}
return 0;   


cristiane

Na kraju ispod return 0; dodaj }
znaci ovako
return 0;
}

Fazon je bio u jednoj zatvorenoj zagradi nisam odmah primjetio
Poslednja Izmena: Decembar 26, 2010, 16:14:16 POSLE PODNE od cristiane

Citat: cristiane poslato Decembar 26, 2010, 16:11:38 POSLE PODNE
Na kraju ispod return 0; dodaj }
znaci ovako
return 0;
}

Fazon je bio u jednoj zatvorenoj zagradi nisam odmah primjetio


ma opet isto