SA-MP Forums Archive
weird errors - 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: weird errors (/showthread.php?tid=256236)



weird errors - gamerhead - 19.05.2011

Hey guys, i got weird errors in my auto heal and auto weapon & armour
Like this:
Код:
F:\gs.pwn(202) : error 025: function heading differs from prototype
F:\gs.pwn(203) : error 025: function heading differs from prototype
F:\gs.pwn(215) : error 025: function heading differs from prototype
F:\gs.pwn(216) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
This are the lines:
Код:
202: forward AUTOHEAL(playerid);
	203:  public AUTOHEAL(playerid)
        215: 	forward AUTOWEAPARMOUR(playerid);
	216:  public AUTOWEAPARMOUR(playerid)
And its strange when i remove this lines on top of the script:
Код:
 forward AUTOHEAL();
forward AUTOWEAPARMOUR();
It works without errors, but ingame the function doesnt work


Re: weird errors - MadeMan - 19.05.2011

How do you call these functions?


Re: weird errors - gamerhead - 20.05.2011

Just AUTOHEAL and AUTOWEAPARMOUR


Re: weird errors - Sascha - 20.05.2011

remove all forwards and publics for those 2 functions and add exact this:
at the top:
pawn Код:
forward AUTOWEAPARMOUR(playerid);
forward AUTOHEAL(playerid);
and somewhere..
pawn Код:
public AUTOWEAPARMOUR(playerid)
{
  return 1;
}
public AUTOHEAL(playerid)
{
  return 1;
}



Re: weird errors - gamerhead - 20.05.2011

Thanks i did it