1 error
#1

here i get this error ..

pawn Код:
C:\Users\hacker\Desktop\lscnr script\filterscripts\hit.pwn(132) : error 030: compound statement not closed at the end of file (started at line 50)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
the error line is at the end of the script

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
     //guns dialog
    if(dialogid == DIALOGWEAPONS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
            {
                if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought a deagle for 10k!");
                GivePlayerMoney(playerid, -10000);
                GivePlayerWeapon(playerid,24, 200);
            }
                case 1:
            {
                if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought a shotgun for 2.5k!");
                GivePlayerMoney(playerid, -2500);
                GivePlayerWeapon(playerid, 25, 200);
            }
                case 2:
            {
                if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought an MP5 for 5k!");
                GivePlayerMoney(playerid, -5000);
                GivePlayerWeapon(playerid, 29 ,300);
            }
                case 3:
            {
                if(GetPlayerMoney(playerid) <13000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought a spas12 for 13k!");
                GivePlayerMoney(playerid, -13000);
                GivePlayerWeapon(playerid, 27, 300);
            }
                case 4:
            {
                if(GetPlayerMoney(playerid) <14000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought an Ak-47 for 14k!");
                GivePlayerMoney(playerid, -14000);
                GivePlayerWeapon(playerid,30 ,450);
            }
                case 5:
            {
                if(GetPlayerMoney(playerid) <15000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought an M4 for 15k!");
                GivePlayerMoney(playerid, -15000);
                GivePlayerWeapon(playerid, 31, 450);
            }
                case 6:
            {
                if(GetPlayerMoney(playerid) <16000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, gun, "You bought a sniper for 16k!");
                GivePlayerMoney(playerid, -16000);
                GivePlayerWeapon(playerid, 34, 210);
            }
                case 7:
            {
                if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                new Float:armour;
                GetPlayerArmour(playerid, armour);
                if(armour == 100) return SendClientMessage(playerid, gun,"You already have a full Armour!");
                SendClientMessage(playerid, gun, "You bought a half armour for 5k!");
                GivePlayerMoney(playerid, -5000);
                SetPlayerArmour(playerid, 50);
            }
                case 8:
            {
                if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                new Float:armour;
                GetPlayerArmour(playerid, armour);
                if(armour == 100) return SendClientMessage(playerid, gun, "You already have a full Armour!");
                SendClientMessage(playerid, gun, "You bought a full Armour for 10k!");
                GivePlayerMoney(playerid, -10000);
                SetPlayerArmour(playerid, 100);
            }

            }
            return 1;
      }
}
Reply
#2

pawn Код:
if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough      money to buy this item!");
                new Float:armour;
                GetPlayerArmour(playerid, armour);
                if(armour == 100) return SendClientMessage(playerid, gun, "You already have a full Armour!");
                SendClientMessage(playerid, gun, "You bought a full Armour for 10k!");
                GivePlayerMoney(playerid, -10000);
                SetPlayerArmour(playerid, 100);
            }

            }
      }
      return 1;
}
Reply
#3

same problem
Reply
#4

Which is the error line?
Reply
#5

Try this:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOGWEAPONS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a deagle for 10k!");
                    GivePlayerMoney(playerid, -10000);
                    GivePlayerWeapon(playerid,24, 200);
                }
                case 1:
                {
                    if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a shotgun for 2.5k!");
                    GivePlayerMoney(playerid, -2500);
                    GivePlayerWeapon(playerid, 25, 200);
                }
                case 2:
                {
                    if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an MP5 for 5k!");
                    GivePlayerMoney(playerid, -5000);
                    GivePlayerWeapon(playerid, 29 ,300);
                }
                case 3:
                {
                    if(GetPlayerMoney(playerid) <13000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a spas12 for 13k!");
                    GivePlayerMoney(playerid, -13000);
                    GivePlayerWeapon(playerid, 27, 300);
                }
                case 4:
                {
                    if(GetPlayerMoney(playerid) <14000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an Ak-47 for 14k!");
                    GivePlayerMoney(playerid, -14000);
                    GivePlayerWeapon(playerid,30 ,450);
                }
                case 5:
                {
                    if(GetPlayerMoney(playerid) <15000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an M4 for 15k!");
                    GivePlayerMoney(playerid, -15000);
                    GivePlayerWeapon(playerid, 31, 450);
                }
                case 6:
                {
                    if(GetPlayerMoney(playerid) <16000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a sniper for 16k!");
                    GivePlayerMoney(playerid, -16000);
                    GivePlayerWeapon(playerid, 34, 210);
                }
                case 7:
                {
                    if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                    new Float:armour;
                    GetPlayerArmour(playerid, armour);
                    if(armour == 100) return SendClientMessage(playerid, gun,"You already have a full Armour!");
                    SendClientMessage(playerid, gun, "You bought a half armour for 5k!");
                    GivePlayerMoney(playerid, -5000);
                    SetPlayerArmour(playerid, 50);
                }
                case 8:
                {
                    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                    new Float:armour;
                    GetPlayerArmour(playerid, armour);
                    if(armour == 100) return SendClientMessage(playerid, gun, "You already have a full Armour!");
                    SendClientMessage(playerid, gun, "You bought a full Armour for 10k!");
                    GivePlayerMoney(playerid, -10000);
                    SetPlayerArmour(playerid, 100);
                }
            }
        }
        return 1;
    }
Reply
#6

same problem
guys the error line doesnt exit in my filterscript
i have 131 lines in filterscript and when i type f5 it says the error line is at 132 -_-
Reply
#7

Alright, then it might be either from an include or something else on your FS.
Reply
#8

I had it wrong, my bad, this is the correct one:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOGWEAPONS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a deagle for 10k!");
                    GivePlayerMoney(playerid, -10000);
                    GivePlayerWeapon(playerid,24, 200);
                }
                case 1:
                {
                    if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a shotgun for 2.5k!");
                    GivePlayerMoney(playerid, -2500);
                    GivePlayerWeapon(playerid, 25, 200);
                }
                case 2:
                {
                    if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an MP5 for 5k!");
                    GivePlayerMoney(playerid, -5000);
                    GivePlayerWeapon(playerid, 29 ,300);
                }
                case 3:
                {
                    if(GetPlayerMoney(playerid) <13000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a spas12 for 13k!");
                    GivePlayerMoney(playerid, -13000);
                    GivePlayerWeapon(playerid, 27, 300);
                }
                case 4:
                {
                    if(GetPlayerMoney(playerid) <14000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an Ak-47 for 14k!");
                    GivePlayerMoney(playerid, -14000);
                    GivePlayerWeapon(playerid,30 ,450);
                }
                case 5:
                {
                    if(GetPlayerMoney(playerid) <15000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought an M4 for 15k!");
                    GivePlayerMoney(playerid, -15000);
                    GivePlayerWeapon(playerid, 31, 450);
                }
                case 6:
                {
                    if(GetPlayerMoney(playerid) <16000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, gun, "You bought a sniper for 16k!");
                    GivePlayerMoney(playerid, -16000);
                    GivePlayerWeapon(playerid, 34, 210);
                }
                case 7:
                {
                    if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                    new Float:armour;
                    GetPlayerArmour(playerid, armour);
                    if(armour == 100) return SendClientMessage(playerid, gun,"You already have a full Armour!");
                    SendClientMessage(playerid, gun, "You bought a half armour for 5k!");
                    GivePlayerMoney(playerid, -5000);
                    SetPlayerArmour(playerid, 50);
                }
                case 8:
                {
                    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, gun, "You don't have enough money to buy this item!");

                    new Float:armour;
                    GetPlayerArmour(playerid, armour);
                    if(armour == 100) return SendClientMessage(playerid, gun, "You already have a full Armour!");
                    SendClientMessage(playerid, gun, "You bought a full Armour for 10k!");
                    GivePlayerMoney(playerid, -10000);
                    SetPlayerArmour(playerid, 100);
                }
            }
        }
        return 1;
    } // Other Dialogs go after this.
    return 1;
}
Reply
#9

thanks so much bro +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)