SA-MP Forums Archive
Bracket error? :@ - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bracket error? :@ (/showthread.php?tid=88151)



Bracket error? :@ - widowmkr - 24.07.2009

Heres the error.
C:\Documents and Settings\Administrator\Desktop\samp\gamemodes\larp .pwn(20712) : error 001: expected token: ")", but found "{"

What i want to happen, when the player is at (playerTopoint) and /duty, they get an extinquisher and armour and health

Код:
			  	else if(PlayerInfo[playerid][pMember] == 11 ||PlayerInfo[playerid][pLeader] == 11)
      if (PlayerToPoint(3, playerid,-1663.4292,14.4364,300.5113)
	    {

			    SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your firefighter Job and will receive Fire Hazard calls.");
			    JobDuty[playerid] = 1;
			    Medics += 1;
			    GetPlayerName(playerid,sendername,sizeof(sendername));
			    SafeGivePlayerWeapon(playerid, 36, 65000);
			    SetPlayerArmour(playerid, 100);
		      SetPlayerHealth(playerid, 100);
  					format(string, sizeof(string), "[Advert] Firefighter %s is On Duty, /call 911 if you have seen any fire hazards!", sendername);
	  			OOCNews(COLOR_FIREMAN,string);
			  }
			}
line 20712 =
Код:
	    {
Just below PlayerTopoint



Re: Bracket error? :@ - MachineHead - 24.07.2009

pawn Код:
else if(PlayerInfo[playerid][pMember] == 11 ||PlayerInfo[playerid][pLeader] == 11) {
          if (PlayerToPoint(3, playerid,-1663.4292,14.4364,300.5113)) {
                SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your firefighter Job and will receive Fire Hazard calls.");
                JobDuty[playerid] = 1;
                Medics += 1;
                GetPlayerName(playerid,sendername,sizeof(sendername));
                SafeGivePlayerWeapon(playerid, 36, 65000);
                SetPlayerArmour(playerid, 100);
              SetPlayerHealth(playerid, 100);
                    format(string, sizeof(string), "[Advert] Firefighter %s is On Duty, /call 911 if you have seen any fire hazards!", sendername);
                OOCNews(COLOR_FIREMAN,string);
              }
            }
Ignoring the bad formatting.


Re: Bracket error? :@ - abhinavdabral - 24.07.2009

see this line...you have forgotten to add one more ")"
I corrected it.
pawn Код:
if (PlayerToPoint(3, playerid,-1663.4292,14.4364,300.5113))
        {
Thank You
-Abhinav


Re: Bracket error? :@ - widowmkr - 24.07.2009

Quote:
Originally Posted by ۞●•λвнiиаv•●۞
see this line...you have forgotten to add one more ")"
I corrected it.
pawn Код:
if (PlayerToPoint(3, playerid,-1663.4292,14.4364,300.5113))
        {
Thank You
-Abhinav
This worked, thanks

@ Clumx, yours didnt, sorry


Re: Bracket error? :@ - abhinavdabral - 24.07.2009

Quote:
Originally Posted by widowmkr
Quote:
Originally Posted by ۞●•λвнiиаv•●۞
see this line...you have forgotten to add one more ")"
I corrected it.
pawn Код:
if (PlayerToPoint(3, playerid,-1663.4292,14.4364,300.5113))
        {
Thank You
-Abhinav
This worked, thanks

@ Clumx, yours didnt, sorry
Good. Now, please add [SOLVED] in from of this topic.

Thank You
-Abhinav (ALWAYS HAPPY TO HELP)
PM ME IF PERSONAL HELP IS NEEDED