i have a probleme help please (+REP)
#1

Hello, i found one error in my script and i can't fix it. i tried but failed.
here is code :
Код:
C:\Users\infogenie\Desktop\Addictive Trainers 2.5.4\gamemodes\own.pwn(1451) : error 036: empty statement
Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1775.4211,2080.3914,10.8203));

   SetPlayerColor(playerid, COLOR_TOMATO);
   GivePlayerWeapon(playerid,42,5000);
   GivePlayerWeapon(playerid,6,1);
   SetPlayerSkin(playerid, 277);
   SetPlayerCheckpoint(playerid,2536.6230, 2072.3806, 10.3258, 12.0);
   SetPlayerCheckpoint(playerid,2589.0271, 2184.6870, 10.3301, 12.0);
   SetPlayerCheckpoint(playerid,2488.7024, 2398.3101, 10.3374, 12.0);
   SetPlayerCheckpoint(playerid,2536.0857, 2259.4763, 10.3379, 12.0);
   SendClientMessage(playerid, COLOR_TOMATO,"Fire Fighters Team called! There are much fires in  the city! Go to the checkpoints and shut them");
   return 1;
}
1451 line is the "if(IsPlayerInRangeOfPoint....
help please
Reply
#2

Hello!

PHP код:
if(IsPlayerInRangeOfPoint(playerid2.01775.4211,2080.3914,10.8203)); 
to
PHP код:
if(IsPlayerInRangeOfPoint(playerid2.01775.4211,2080.3914,10.8203))

Reply
#3

IsPlayerInRangeOfPoint is a condition, don't have ";".
Reply
#4

now look i got this probleme
Код:
error 030: compound statement not closed at the end of file (started at line 1451)
Reply
#5

Where is the mistake?
Reply
#6

PHP код:
if(IsPlayerInRangeOfPoint(playerid2.01775.4211,2080.3914,10.8203));
{
   
SetPlayerColor(playeridCOLOR_TOMATO);
   
GivePlayerWeapon(playerid,42,5000);
   
GivePlayerWeapon(playerid,6,1);
   
SetPlayerSkin(playerid277);
   
SetPlayerCheckpoint(playerid,2536.62302072.380610.325812.0);
   
SetPlayerCheckpoint(playerid,2589.02712184.687010.330112.0);
   
SetPlayerCheckpoint(playerid,2488.70242398.310110.337412.0);
   
SetPlayerCheckpoint(playerid,2536.08572259.476310.337912.0);
   
SendClientMessage(playeridCOLOR_TOMATO,"Fire Fighters Team called! There are much fires in  the city! Go to the checkpoints and shut them");
   return 
1;

Try this.
Reply
#7

now look i have this warning
Код:
 warning 209: function "cmd_onduty" should return a value
how to fix it and what i must do?
Reply
#8

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
now look i have this warning
Код:
 warning 209: function "cmd_onduty" should return a value
how to fix it and what i must do?
That warning appears mostly in the return, did you return 1; or return 0;?
Reply
#9

in the end? yes "return 1;"
So?
Reply
#10

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
in the end? yes "return 1;"
So?
Edited: sorry didn't see what you needed to return..where is the onduty command located?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)