SA-MP Forums Archive
HELP error 030: compound statement not closed at the end of file (started at line 31) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP error 030: compound statement not closed at the end of file (started at line 31) (/showthread.php?tid=504573)



HELP error 030: compound statement not closed at the end of file (started at line 31) - Mriss - 05.04.2014

CODE: http://pastebin.com/Tbv6bPqd

Please help


AW: HELP error 030: compound statement not closed at the end of file (started at line 31) - Macronix - 05.04.2014

Here:
pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#define DIALOGWEAPONS 9999

#define COLOR_GRAD 0x6E76ADFF

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOGWEAPONS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    if(GetPlayerMoney(playerid) <1500) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought a deagle for 15k!");
                    GivePlayerMoney(playerid, -1500);
                    GivePlayerWeapon(playerid,24, 9999999);
                }
                    case 1:
                {
                    if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought a shotgun for 2.5k!");
                    GivePlayerMoney(playerid, -2500);
                    GivePlayerWeapon(playerid, 25, 9999999);
                }
                    case 2:
                {
                    if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought an MP5 for 5k!");
                    GivePlayerMoney(playerid, -5000);
                    GivePlayerWeapon(playerid, 29 ,9999999);
                }
                    case 3:
                {
                    if(GetPlayerMoney(playerid) <170000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought a spas12 for 170k!");
                    GivePlayerMoney(playerid, -170000);
                    GivePlayerWeapon(playerid, 27, 9999999);
                }
                    case 4:
                {
                    if(GetPlayerMoney(playerid) <50000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought an  for 50k!");
                    GivePlayerMoney(playerid, -50000);
                    GivePlayerWeapon(playerid,30 ,9999999);
                }
                    case 5:
                {
                    if(GetPlayerMoney(playerid) <60000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought an  for 60k!");
                    GivePlayerMoney(playerid, -60000);
                    GivePlayerWeapon(playerid, 31, 9999999);
                }
                    case 6:
                {
                    if(GetPlayerMoney(playerid) <150000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought a sniper for 150k!");
                    GivePlayerMoney(playerid, -150000);
                    GivePlayerWeapon(playerid, 34, 9999999);
                }
                    case 7:
                {
                    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item!");

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

                    new Float:armour;
                    GetPlayerArmour(playerid, armour);
                    if(armour == 100) return SendClientMessage(playerid, COLOR_GRAD, "You already have a full vest!");
                    SendClientMessage(playerid, COLOR_GRAD, "You bought a full vest for 20k!");
                    GivePlayerMoney(playerid, -20000);
                    SetPlayerArmour(playerid, 100);
                }
            }
        }
    }
    return 1;
}