error 040: duplicate "case" label (value 1)
#1

Код:
(740) : error 040: duplicate "case" label (value 1)
help, how to problem fix?

Код:
	    
                case DCLASS:
		{
		  if(!response) return ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Vбlassz kategуriбt","Assault\nSniper\nSupporter","Kivбlaszt","");
	  	  if(response)
                  {
	           if(listitem == 0)
	           {
	                        ResetPlayerWeapons(playerid);
	                        gClass[playerid] = ASSAULT;
				GivePlayerWeapon(playerid,24,150);
				GivePlayerWeapon(playerid,31,300);
				GivePlayerWeapon(playerid,29,200);
				SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Kivбlasztott kategуria, Assault.");
				pInfo[playerid][pRank] = 0;
	          }
	        if(listitem == 1)
	        {
	            ResetPlayerWeapons(playerid);
	            gClass[playerid] = SNIPER;
	            GivePlayerWeapon(playerid,24,150);
	            GivePlayerWeapon(playerid,29,200);
	            GivePlayerWeapon(playerid,34,200);
                    SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Kivбlasztott kategуria, Sniper.");
                    pInfo[playerid][pRank] = 1;
	        }
	        if(listitem == 2)
	        {
    			ResetPlayerWeapons(playerid);
				SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Kivбlasztott kategуria, Support.");
				GivePlayerWeapon(playerid,25,200);
				GivePlayerWeapon(playerid,29,200);
				GivePlayerWeapon(playerid,24,150);
				gClass[playerid] = SUPPORT;
				pInfo[playerid][pRank] = 2;
	        }
   	       }
	    } <<<<<<<<<<<<<<ERROR
	  case DIALOG_VASARLAS:
	   {
 	      if(!response) return 1;
	      if(response)
              {
	        if(listitem == 0)
	        {
	            SetPlayerArmour(playerid,100);
				SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Sikeres vбsбrlбs! Pбncйlzat megvйve!");
				pInfo[playerid][Penz] -= 15000;
	        }
	        if(listitem == 1)
	        {
	            SetPlayerHealth(playerid,100);
                SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Sikeres vбsбrlбs! Йlet  megvйve!");
               	pInfo[playerid][Penz] -= 10000;
	        }
	        if(listitem == 2)
	        {
				GivePlayerWeapon(playerid,16,3);
				SendClientMessage(playerid,COLOR_GREEN,"[INFO]: Sikeres vбsбrlбs! Grбnбt megvйve!");
				pInfo[playerid][Penz] -= 30000;
	        }
	      }
 	    }  
            return 1;
}
Reply
#2

It's a little bit hard to read your code as you used the [/code] instead of tags, but I think you have an extra } so try deleting it, not sure though as I can't read it properly.
Reply
#3

It can be that both dialogs have the same value? Show us the place you define them please.
Reply
#4

http://pastebin.com/R2KNr9zf << dont work


full code: http://pastebin.com/JXZjH70G
Reply
#5

help please
Reply
#6

There are not #define tags there, where are you defining those labels?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)