2 Errors
#1

Hello lads, I've gotten great help here the last few days and all I need now is for my last 2 errors to be done and I can open my server! Can anyone please help, I will REP you 100 percent. Thank you.

So, here are my errors:
Quote:

C:\Users\Aoky\Desktop\New folder\Murderer.pwn(321) : error 010: invalid function or declaration
C:\Users\Aoky\Desktop\New folder\Murderer.pwn(334) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Here is line 316 to 321:
Quote:

public OnPlayerRequestSpawn(playerid) return SpawnPlayer(playerid);

forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart);

return 1;
}

Here is line 334:
Quote:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart){return 1;}

Thank you once again. X
Reply
#2

This is how it works:

PHP код:
public OnPlayerRequestSpawn(playerid) return SpawnPlayer(playerid);
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    
// CODE HERE
    
return 1;
}
forward OnPlayerGiveDamageActor(playeriddamaged_actoridFloatamountweaponidbodypart)
{
    
// CODE HERE
    
return 1;

EDIT ;

Note: You should remove the forwards for OnPlayerWeaponShot and OnPlayerGiveDamageActor since they are intergrated in SA-MP.
Reply
#3

Quote:
Originally Posted by AjaxM
Посмотреть сообщение
This is how it works:

PHP код:
public OnPlayerRequestSpawn(playerid) return SpawnPlayer(playerid);
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    
// CODE HERE
    
return 1;
}
forward OnPlayerGiveDamageActor(playeriddamaged_actoridFloatamountweaponidbodypart)
{
    
// CODE HERE
    
return 1;

EDIT ;

Note: You should remove the forwards for OnPlayerWeaponShot and OnPlayerGiveDamageActor since they are intergrated in SA-MP.
I pasted that in and I got 6 errors, have you got any other idea? Thanks so much for the help!
Reply
#4

Remove the code i gave you along with the forwards that you placed.

i.e: forward OnPlayerWeaponShot and forward OnPlayerGiveDamageActor

Because they are SA-MP integrated.
Reply
#5

Quote:
Originally Posted by AjaxM
Посмотреть сообщение
Remove the code i gave you along with the forwards that you placed.

i.e: forward OnPlayerWeaponShot and forward OnPlayerGiveDamageActor

Because they are SA-MP integrated.
I did that but now the gamemode is "Unknown". This is the error I get in my logs.
[17:35:43] Script[gamemodes/Murderer.amx]: Run time error 19: "File or function is not found"
Reply
#6

Update the includes and the server. Also you don't need to forward anything.
Reply
#7

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Update the includes and the server. Also you don't need to forward anything.
Do you know what includes it could be? I have so many..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)