[ERROR] function heading differs from prototype -
Rand_Omar - 29.03.2010
That's a weird error, it's the weirdest one i've encountered till now.. and i don't understand it to fix it!
Код:
C:\Users\Soka\Desktop\AC-RP\gamemodes\acrp.pwn(3455) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Here is the root of the error:
pawn Код:
public GateClose5(playerid) // Line 3455
{
IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828)
{
SendClientMessage(playerid, 0x00AE57FF, "You're stepping in the area of a hydraulically action, please step out~!");
}
DestroyObject(pdgate3);
pdgate2 = CreateObject(968,1544.700317,-1630.735717,13.096980,-1.000000,-91.000000,269.972869);
return 1;
}
Re: [ERROR] function heading differs from prototype -
Calgon - 29.03.2010
The 'forward' you added doesn't match what is defined in your public function.
Check that the forward for your public function is:
pawn Код:
forward GateClose5(playerid);
Re: [ERROR] function heading differs from prototype -
Rand_Omar - 29.03.2010
hmm hmmm.. you're right mate.. thank you.. i keep discovering new stupid things i forget to edit !!
Thank you anyways.
Re: [ERROR] function heading differs from prototype -
Calgon - 29.03.2010
No problem, glad it worked

.
Re: [ERROR] function heading differs from prototype -
Jefff - 29.03.2010
Код:
IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828)
Код:
if(IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828))
Re: [ERROR] function heading differs from prototype -
Rand_Omar - 29.03.2010
Quote:
Originally Posted by Jefff
Код:
IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828)
Код:
if(IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828))
|
This is not the problem i was having & it didn't fix anything for your info
P.S: The problem was not in the code, but was in forwarding the "public GateClose5"
Re: [ERROR] function heading differs from prototype -
Correlli - 29.03.2010
Quote:
Originally Posted by ʂylaɾ
Quote:
Originally Posted by Jefff
Код:
IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828)
Код:
if(IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828))
|
This is not the problem i was having & it didn't fix anything for your info
P.S: The problem was not in the code, but was in forwarding the "public GateClose5"
|
That was ALSO the problem for you. You're not using
IsPlayerInRangeOfPoint correctly. Jefff gave you the correct example.
Re: [ERROR] function heading differs from prototype -
Rand_Omar - 29.03.2010
What do you mean? if you're talking about that it will not close if he is near it, no, i want it to close at him and give him this message, cause he/her loses health with the timer has passed..
Roleplay server.
Re: [ERROR] function heading differs from prototype -
Correlli - 29.03.2010
This is your code:
pawn Код:
IsPlayerInRangeOfPoint(playerid, 1, 1544.7980, -1627.3271, 13.3828)
{
SendClientMessage(playerid, 0x00AE57FF, "You're stepping in the area of a hydraulically action, please step out~!");
}
and it's the wrong way to use.
This is the correct way:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1544.7980, -1627.3271, 13.3828))
{
SendClientMessage(playerid, 0x00AE57FF, "You're stepping in the area of a hydraulically action, please step out!");
}
or more optimized:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1544.7980, -1627.3271, 13.3828)) SendClientMessage(playerid, 0x00AE57FF, "You're stepping in the area of a hydraulically action, please step out!");
https://sampwiki.blast.hk/wiki/Keywords:Statements#if