Missing a bracket.
#1

please help:
Код:
	if(strcmp(cmd, "/rivalwar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
 			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
    		{
    		    if(PlayerInfo[playerid][pRank] >= 5)
    		    {
			        if(IsPlayerInArea(playerid,TurfInfo[1][MinX],TurfInfo[1][MinY],TurfInfo[1][MaxX],TurfInfo[1][MaxY]))
			        {
						if(TurfInfo[1][CodTime] <= 0)
						{
			                if(TurfInWar[1] == 0)
			                {
				                new cYakuza;
				                new cLaCosaNostra;
					            for(new i=0; i<MAX_PLAYERS; i++)
								{
									if(IsPlayerConnected(i))
									{
									    if(PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6)
									    {
									        cYakuza++;
										}
										if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5)
										{
										    cLaCosaNostra++;
										}
									}
								}
								if(cYakuza >= 2 && cLaCosaNostra >= 2)
								{
									if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
									{
									    if(TurfInfo[1][Owner] == 6)
									    {
											StartLYWar(5, 6, 1);
											ContorizationTimerLY = SetTimer("ContorizationLY", 3500, true);
		                                  	new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~Yakuza");
		                                  	TextDrawFont(TDatack, 0);
		                                  	TextDrawSetShadow(TDatack, 0);
		                                  	TextDrawSetOutline(TDatack, 1);
		                                  	TextDrawColor(TDatack, 0xDFDFDFFF);
		                                  	TimeTextForPlayer(playerid, TDatack, 10000);
										}
										else
										{
										    SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood");
										}
									}
									if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
									{
									    if(TurfInfo[1][Owner] == 5)
									    {
											StartLYWar(6, 5, 1);
											ContorizationTimerLY = SetTimer("ContorizationLY", 3500, true);
		                                  	new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~La Cosa Nostra");
		                                  	TextDrawFont(TDatack, 0);
		                                  	TextDrawSetShadow(TDatack, 0);
		                                  	TextDrawSetOutline(TDatack, 1);
		                                  	TextDrawColor(TDatack, 0xDFDFDFFF);
		                                  	TimeTextForPlayer(playerid, TDatack, 10000);
		                                }
										else
										{
										    SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood");
										}
									}
								}
								if(!(cYakuza >= 2 && cLaCosaNostra >= 2))
								{
								    SendClientMessage(playerid,COLOR_WHITE, "There must be at least 2 members in each factions");
								}
							}
							else
							{
							    SendClientMessage(playerid, COLOR_WHITE, "Can't start 2 rival wars at the sime time");
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_WHITE, "You must wait 3 hours between Rival-Wars");
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_WHITE, "You ar not in a rival hood");
					}
				}
				else
				{
				    SendClientMessage(playerid,COLOR_WHITE, "You need at least Rank 5 for this action");
				}
        	}
        	else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    		{
    		    if(PlayerInfo[playerid][pRank] >= 5)
    		    {
			        if(IsPlayerInArea(playerid,TurfInfo[2][MinX],TurfInfo[2][MinY],TurfInfo[2][MaxX],TurfInfo[2][MaxY]))
			        {
			            if(TurfInfo[2][CodTime] <= 0)
						{
			                if(TurfInWar[2] == 0)
			                {
				                new cCrips;
				                new cBloods;
					            for(new i=0; i<MAX_PLAYERS; i++)
								{
									if(IsPlayerConnected(i))
									{
									    if(PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12)
									    {
									        cCrips++;
										}
										if(PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 13)
										{
										    cBloods++;
										}
									}
								}
								if(cCrips >= 2 && cBloods >= 2)
								{
									if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
									{
									    if(TurfInfo[2][Owner] == 13)
									    {
											StartCBWar(12, 13, 2);
											ContorizationTimerCB = SetTimer("ContorizationCB", 3500, true);
		                                  	new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Crips Gang");
		                                  	TextDrawFont(TDatack, 0);
		                                  	TextDrawSetShadow(TDatack, 0);
		                                  	TextDrawSetOutline(TDatack, 1);
		                                  	TextDrawColor(TDatack, 0xDFDFDFFF);
		                                  	TimeTextForPlayer(playerid, TDatack, 10000);
										}
										else
										{
										    SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood");
										}
									}
									if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
									{
									    if(TurfInfo[2][Owner] == 12)
									    {
											StartCBWar(13, 12, 2);
											ContorizationTimerCB = SetTimer("ContorizationCB", 3500, true);
		                                  	new Text:TDatack = TextDrawCreate(200.0, 385.0, "~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Bloods Gang");
		                                  	TextDrawFont(TDatack, 0);
		                                  	TextDrawSetShadow(TDatack, 0);
		                                  	TextDrawSetOutline(TDatack, 1);
		                                  	TextDrawColor(TDatack, 0xDFDFDFFF);
		                                  	TimeTextForPlayer(playerid, TDatack, 10000);
		                                }
										else
										{
										    SendClientMessage(playerid, COLOR_WHITE, "You are not in a rival hood");
										}
									}
								}
								if(!(cCrips >= 2 && cBloods >= 2))
								{
								    SendClientMessage(playerid,COLOR_WHITE, "There must be at least 2 members in each factions");
								}
							}
							else
							{
							    SendClientMessage(playerid, COLOR_WHITE, "Can't start 2 rival wars at the sime time");
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_WHITE, "You must wait 3 hours between Rival-Wars");
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_WHITE, "You ar not in a rival hood");
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_WHITE, "You need at least Rank 5 for this action");
				}
        	}
http://imgur.com/4FjUaxx
Reply
#2

Try to use this bracket finder, it should give the id of the row's with the missing brackets:
https://sampforum.blast.hk/showthread.php?tid=291018
Reply
#3

I do not understand ... I can do it you ask?
Reply
#4

Quote:
Originally Posted by Jimmi
Посмотреть сообщение
I do not understand ... I can do it you ask?
English: You can use bracketfinder tool for search the missing bracket...

----------------------------------------------------------------------------------------------------------------------------------
#He seems to don't know so much about english so I'll tell him in portuguese
----------------------------------------------------------------------------------------------------------------------------------
Portuguese: Vocк pode usar a ferramenta de procura de brackets pra ver qual bracket falta, crie o tуpico na nossa board, й mais fбcil de te ajudar caso vocк nгo entenda muito de inglкs.

http://forum.sa-mp.com/forumdisplay.php?f=34
Reply
#5

upppp
Reply
#6

Hello!

Here:
PHP код:
new Text:TDatack;//global
if(!strcmp(cmd,"/rivalwar",true))
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 6)
    {
        if(
PlayerInfo[playerid][pRank] < 5)return SendClientMessage(playerid,COLOR_WHITE"You need at least Rank 5 for this action");
        if(!
IsPlayerInArea(playerid,TurfInfo[1][MinX],TurfInfo[1][MinY],TurfInfo[1][MaxX],TurfInfo[i][MaxY]))return SendClientMessage(playeridCOLOR_WHITE"You ar not in a rival hood");
        if(
TurfInfo[1][CodTime] > 0)return SendClientMessage(playeridCOLOR_WHITE"You must wait 3 hours between Rival-Wars");
        if(
TurfInWar[1] != 0)return SendClientMessage(playeridCOLOR_WHITE"Can't start 2 rival wars at the sime time");
        new 
cYakuza,cLaCosaNostra;
        for(new 
i;i<MAX_PLAYERS;i++)
        {
            if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
            if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 5)cLaCosaNostra ++;
            else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 6)cYakuza ++;
        }
        if(
cYakuza || cLaCosaNostra 2)return SendClientMessage(playerid,COLOR_WHITE"There must be at least 2 members in each factions");
        if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 5)
        {
            if(
TurfInfo[1][Owner] != 6)return SendClientMessage(playeridCOLOR_WHITE"You are not in a rival hood");
              
StartLYWar(5,6,1);
              
ContorizationTimerLY SetTimer("ContorizationLY",3500,true);
              
TDatack TextDrawCreate(200.0385.0"~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~Yakuza");
             
TextDrawFont(TDatack0);
             
TextDrawSetShadow(TDatack0);
             
TextDrawSetOutline(TDatack1);
             
TextDrawColor(TDatack0xDFDFDFFF);
             
TimeTextForPlayer(playeridTDatack10000);
        }
        else if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 6)
        {
            if(
TurfInfo[1][Owner] != 5)return SendClientMessage(playeridCOLOR_WHITE"You are not in a rival hood");
            
StartLYWar(651);
            
ContorizationTimerLY SetTimer("ContorizationLY"3500true);
            
TDatack TextDrawCreate(200.0385.0"~w~We have provoked a turfwar ~w~in ~y~Rival-Wars Turf ~w~against the ~r~La Cosa Nostra");
            
TextDrawFont(TDatack0);
            
TextDrawSetShadow(TDatack0);
            
TextDrawSetOutline(TDatack1);
            
TextDrawColor(TDatack0xDFDFDFFF);
            
TimeTextForPlayer(playeridTDatack10000);
        }
        return 
1;
    }
    else if(
PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    {
        if(
PlayerInfo[playerid][pRank] < 5)return SendClientMessage(playeridCOLOR_WHITE"You need at least Rank 5 for this action");
        if(!
IsPlayerInArea(playerid,TurfInfo[2][MinX],TurfInfo[2][MinY],TurfInfo[2][MaxX],TurfInfo[2][MaxY]))return SendClientMessage(playeridCOLOR_WHITE"You ar not in a rival hood");
        if(
TurfInfo[2][CodTime] > 0)return SendClientMessage(playeridCOLOR_WHITE"You must wait 3 hours between Rival-Wars");
        if(
TurfInWar[2] != 0)return SendClientMessage(playeridCOLOR_WHITE"Can't start 2 rival wars at the sime time");
        new 
cCrips,cBloods;
        for(new 
i;i<MAX_PLAYERS;i++)
        {
            if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
            if(
PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12)cCrips ++;
            else if(
PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 13)cBloods ++;
        }
        if(
cCrips || cBloods 2)return SendClientMessage(playerid,COLOR_WHITE"There must be at least 2 members in each factions");
         if(
PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
          {
               if(
TurfInfo[2][Owner] != 13)return SendClientMessage(playeridCOLOR_WHITE"You are not in a rival hood");
               
StartCBWar(12132);
            
ContorizationTimerCB SetTimer("ContorizationCB"3500true);
            
TDatack TextDrawCreate(200.0385.0"~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Crips Gang");
            
TextDrawFont(TDatack0);
            
TextDrawSetShadow(TDatack0);
            
TextDrawSetOutline(TDatack1);
            
TextDrawColor(TDatack0xDFDFDFFF);
            
TimeTextForPlayer(playeridTDatack10000);
        }
         else if(
PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
          {
               if(
TurfInfo[2][Owner] != 12)return SendClientMessage(playeridCOLOR_WHITE"You are not in a rival hood");
               
StartCBWar(13122);
            
ContorizationTimerCB SetTimer("ContorizationCB"3500true);
            
TDatack TextDrawCreate(200.0385.0"~w~We have provoked a turfwar ~w~in ~y~ Rival-Wars Turf Turf. ~w~against the ~r~Bloods Gang");
            
TextDrawFont(TDatack0);
            
TextDrawSetShadow(TDatack0);
            
TextDrawSetOutline(TDatack1);
            
TextDrawColor(TDatack0xDFDFDFFF);
            
TimeTextForPlayer(playeridTDatack10000);
        }
        return 
1;
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)