engine help
#1

the old enginebreak basicly spamed the chatbox untill they got out, so i tried rebuiling one with the /stop command for the engine, now what did i do wrong?
Код:
public EngineBreak(targetid, playerid)
{
  
  new sendername[MAX_PLAYER_NAME];
	new Float:vHealth;
	GetPlayerName(playerid, sendername, sizeof(sendername));
  GetVehicleHealth(GetPlayerVehicleID(targetid),vHealth);
	if(IsPlayerInAnyVehicle(targetid))
 	if(vHealth < 450)
	{
 		if(!engineOn[GetPlayerVehicleID(playerid)])
 		{
			SendClientMessage(playerid, COLOR_GREEN, "How The Fuck Did Your Car Break With The Engine Off??");
 			TogglePlayerControllable(playerid, false);
		}
		else
		{
			engineOn[GetPlayerVehicleID(playerid)] = false;
			TogglePlayerControllable(playerid, false);
			SendClientMessage(playerid, COLOR_GREEN, "Your Engine is Broken, Call a mechanic /service mechanic!");
			SendClientMessage(playerid, COLOR_GREEN, "Use /extcar to get out!");
			return true;
		)
	  }
}
errors are
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\CityWideRP\gamemodes\gamemodes\WC-RP.pwn(28711) : error 025: function heading differs from prototype
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\CityWideRP\gamemodes\gamemodes\WC-RP.pwn(28733) : warning 225: unreachable code
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\CityWideRP\gamemodes\gamemodes\WC-RP.pwn(28733) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\CityWideRP\gamemodes\gamemodes\WC-RP.pwn(28733) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\SA-MP SERVER\CityWideRP\gamemodes\gamemodes\WC-RP.pwn(28764) : error 030: compound statement not closed at the end of file (started at line 28714)
Reply
#2

everybody answers to all the other posts, but not mine?

damn, doesnt anyone help....
Reply
#3

Please write lines where is error...
Reply
#4

Quote:

error 025: function heading differs from prototype

your public heading differs from your forwarded heading, redo it.

Quote:

warning 225: unreachable code

basicly says it all, the code there cannot be reached, because the function always returns a value before that bit of code

Quote:

warning 217: loose indentation

speaks for itself

error 029: invalid expression, assumed zero[/quote]
a syntax error somewhere, probably in an if statement

error 030: compound statement not closed at the end of file (started at line 28714)[/quote]
you're missing a closing bracket (you close the else block with a ) instead of a } )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)