Help with Zombie FCNPC Include.
#1

Hello everyone, first of all i want to say "thank you" for taking time to view my topic.
Alright listen, Today i decided to update my server, So i wanted to add zombie NPCs using FCNPC Include and Plugin.
everything works fine but when i tried to compile my GameMode Script again, i faced some errors but i don't know how to fix them, i searched in ****** too and no results.
So, i decided to ask for help from SAMP FORUMS.
here is the errors while compiling:
PHP Code:
C:\Users\cpt\Desktop\Script Package\pawno\include\FCNPC.inc(282) : warning 202number of arguments does not match definition
C
:\Users\cpt\Desktop\Script Package\pawno\include\FCNPC.inc(295) : error 025: function heading differs from prototype 
and here are the lines in FCNPC include :
This is line 282
PHP Code:
return FCNPC_OnPlayerTakeDamage(playeridissueridamountweaponidbodypart); 
and here is line 295:
PHP Code:
forward FCNPC_OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart); 
i hope you'll help me guys
Reply
#2

Code:
FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss)
Reply
#3

Quote:
Originally Posted by Amads
View Post
Code:
FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss)
Thanks! but look
PHP Code:
warning 235: public function lacks forward declaration (symbol "FCNPC_OnPlayerTakeDamage")
error 004: function "FCNPC_OnTakeDamage" is not implemented 
Reply
#4

Code:
forward FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss);
public FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss)
{
	// code
	return 1;
}
Reply
#5

you just did a mistake you forget to type "Player"
it's like this
"FCNPC_OnPlayerTakeDamage"
PHP Code:
error 025: function heading differs from prototype
error 017
undefined symbol "damagerid"
error 025: function heading differs from prototype 
Line 279 :
PHP Code:
public OnPlayerTakeDamage(npcid,playeridissueridFloat:amountweaponidbodypart//This is the line 279
{
    
#if defined FCNPC_OnPlayerTakeDamage
        
return FCNPC_OnPlayerTakeDamage(npciddamageridweaponidbodypartFloat:health_loss); //This is 282
    #else
        
return 1;
    
#endif

and here is LINE 295 :
PHP Code:
    forward FCNPC_OnPlayerTakeDamage(npciddamageridweaponidbodypartFloat:health_loss); 
Reply
#6

Code:
return FCNPC_OnPlayerTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss);
damagerid should be passed with the variable issuerid under OnPlayerTakeDamage
Reply
#7

Quote:
Originally Posted by Toroi
View Post
Code:
return FCNPC_OnPlayerTakeDamage(npcid, damagerid, weaponid, bodypart, Float:health_loss);
damagerid should be passed with the variable issuerid under OnPlayerTakeDamage
thank you so much , my problem is already solved but special thanks to you and Amads
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)