SA-MP Forums Archive
Slice's Damage Include - 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)
+--- Thread: Slice's Damage Include (/showthread.php?tid=660064)



Slice's Damage Include - Leaky - 24.10.2018

I added slice's include to my script and when I tried to comply I get 2 errors when I sat and examine the errors I noticed that it's a problem with OnPlayerDamage. It seems as if that onplayerdamage is already defined in Slice's include, and it is being used in another include as well as my gamemode, the only way I know how to fix this is by removing one of the defines but if I remove it from my main script my headshot system will be gone and if i remove it from rogue's anti fake-kill there would most likely be a problem of it not working so I'm wondering if anyone knows how to fix this or how to link all include that have Onplayerdamage as one.

Код:
C:\Users\****'\Desktop\Editors\Pawno\pawno\include\AFkill.inc(259) : error 021: symbol already defined: "WC_OnPlayerDamage"
C:\Users\****'\Desktop\Editors\Pawno\gamemodes\GDM.pwn(6644) : error 021: symbol already defined: "WC_OnPlayerDamage"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
PHP код:
//error in my main script
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
//Error in rogue's AFkill include
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart
As you can see I did as slice said, to replace all OnPlayerGiveDamage and OnPlayerTakeDamage with OnPlayerDamage

Ask for anything I'll post it asap


Re: Slice's Damage Include - Infin1ty - 24.10.2018

as you mentioned yourself slice's include is probably being used by other includes as well as your gamemode. you could move your headshot system to one of the includes or you could hook onto OnPlayerDamage.