[REQ-HELP] error 025: function heading differs from prototype
#1

Hello, I'm trying to upgrade my script to 0.3x from 0.3e i'm using an edit of the zGaming script i'm getting and error which i do not know how to resolve if some one could help me with this i would be very grateful.

Error:
Код:
E:\Users\Matthew\Desktop\New folder (3)\server files\gamemodes\zSGRP.pwn(4506) : error 025: function heading differs from prototype
E:\Users\Matthew\Desktop\New folder (3)\server files\gamemodes\zSGRP.pwn(117374) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line and below of what error is on :
Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
	new string[128];
	if(GetPlayerWeapon(Shooter) == 34 && PlayerInfo[Shooter][pScope] && Hitman[Shooter] == Target)
	{
		SetPlayerHealth(Target, 0);
		if(Hitman[Shooter] == Target)
		{
		    format(string, sizeof(string), " You have been critically injured by a hitman and lost $%d, the contrat on your head was cleared.", PlayerInfo[Target][pContract]/2);
		    SendClientMessage(Target, COLOR_YELLOW, string);
		    format(string, sizeof(string), "HitmanWarn: %s has fulfilled the contract on %s's head and collected $%d.", RPN(Shooter), RPN(Target), PlayerInfo[Target][pContract]/2);
			SendHitmanMessage(COLOR_YELLOW, string);
			GiveZaiatMoney(Target, -PlayerInfo[Target][pContract]/2);
			GiveZaiatMoney(Shooter, PlayerInfo[Target][pContract]/2);
			PlayerInfo[Target][pContract] = 0;
			format(PlayerInfo[Target][pContract], 32, "");
			Hitman[Shooter] = -1;
			PlayerInfo[Shooter][pCSuccess] ++;
		}
		PlayerInfo[Shooter][pScope] --;
	}
Reply
#2

That means that this:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)
is not the same as in forward OnPlayerShootPlayer(....)

Could you post the forward?
Reply
#3

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
That means that this:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)
is not the same as in forward OnPlayerShootPlayer(....)

Could you post the forward?
There actually isnt a forward for OnPlayerShootPlayer that i can find um would it help if i just gave you the script?
Reply
#4

Hmm, do you use an include for OnPlayerShootPlayer?
If yes, then look there for the forward..
The public in your script should be the same as the forward in the include..
In this case I can't do much with your script I think :P
Reply
#5

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
Hmm, do you use an include for OnPlayerShootPlayer?
If yes, then look there for the forward..
The public in your script should be the same as the forward in the include..
In this case I can't do much with your script I think :P
um this
Код:
forward OnPlayerShootPlayer(shooter,target,Float:damage);
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)