Glupi Error 002

Započeo black_dota, Jul 08, 2010, 21:17:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

black_dota

Ja hteo da napravim prvi dialog i dobijem ovo [cenzura] jebeno:C:\Users\Stefan Katic\Desktop\Stuff\server 0.3\nesto moje\(FS)Express Guns V1.0.pwn(309) : error 002: only a single statement (or expression) can follow each "case"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Evo jebenog govneta koje sam pisao i pratio sa SAMP WIKI-ja:public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
   {
   switch(1)
       {
case 1:
       {
          switch(2)
        {
           case 0://Colt 45.
           {
               if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -100);
               GivePlayerWeapon(playerid, 22,200);
           }
           case 1://SDPistol
           {
               if(GetPlayerMoney(playerid) < 125) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -125);
               GivePlayerWeapon(playerid, 23,200);
           }
           case 2://Deagle
           {
               if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -200);
               GivePlayerWeapon(playerid, 24,200);
           }
           case 3://Tec9
           {
               if(GetPlayerMoney(playerid) < 230) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -230);
               GivePlayerWeapon(playerid, 32,230);
           }
           case 4://UZI
           {
               if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -250);
               GivePlayerWeapon(playerid, 28,250);
           }
           case 5://MP5
           {
               if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -300);
               GivePlayerWeapon(playerid, 29,300);
           }
           case 6://Sawn-Off
           {
               if(GetPlayerMoney(playerid) < 325) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -325);
               GivePlayerWeapon(playerid, 26,150);
           }
           case 7://Shotgun
           {
               if(GetPlayerMoney(playerid) < 330) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -330);
               GivePlayerWeapon(playerid, 25,150);
           }
           case 8://Combat Shotgun
           {
               if(GetPlayerMoney(playerid) < 375) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -375);
               GivePlayerWeapon(playerid, 27,200);
           }
           case 9://AK47
           {
               if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -1500);
               GivePlayerWeapon(playerid, 30,300);
           }
           case 10://M4
           {
               if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -2000);
               GivePlayerWeapon(playerid, 31,350);
           }
           case 11://Rifle
           {
               if(GetPlayerMoney(playerid) < 2105) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -2105);
               GivePlayerWeapon(playerid, 33,500);
           }
           case 12://Sniper Rifle
           {
               if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xFFFFFF, "Nemas dovoljno novca.");
               GivePlayerMoney(playerid, -2500);
               GivePlayerWeapon(playerid, 34,250);
           }
            case 13://Melle
{
               ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "~Express Guns~","Knife(50$)\nLopata(55$)\nStap za Golf(55$)\nKatana(75$)\nChainsaw(2000$)", "Izaberi", "Otkazi");
    return 1;
           }

Evo smrdljive komande koju sam koristio da mi izbaci taj glupi dialog:public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/guns", true))
{
       ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "~Express Guns~","Colt 45.(100$)\nSDPistol(125$)\nDeagle(200$)\nTec9(230$)\nUzi(250$)\nMP5(300$)\nSawn-Off(325$)\nShotgun(330$)\nCombat-Shotgun(375$)\nAK47(1500$)\nM4(2000$)\nRifle(2105$)\nSniper Rifle(2500$)\nMelle" , "Izaberi", "Otkazi");
return 1;
}
return 0;
}

Kako da popravim taj error 002 i kako da stavim da kada odaberem melle da mi izbaci novi dialog i da mogu kupiti nozeve i ostalo.Izvinjavam se zbog recnika jebeno sam ljut na glupi Error 002.
Poslednja Izmena: Jul 08, 2010, 21:24:29 POSLE PODNE od black_dota

Kolko ja znam nejde switch i case nego dialogid i listitem
Aequam memento rebus in arduis servare mentem.

black_dota

Spasi me i reci sta da uradim. 8)