2 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)
+--- Thread: 2 Errors (
/showthread.php?tid=627323)
2 Errors -
aoky - 26.01.2017
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
Re: 2 Errors -
AjaxM - 26.01.2017
This is how it works:
PHP код:
public OnPlayerRequestSpawn(playerid) return SpawnPlayer(playerid);
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
// CODE HERE
return 1;
}
forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
// CODE HERE
return 1;
}
EDIT ;
Note: You should remove the forwards for OnPlayerWeaponShot and OnPlayerGiveDamageActor since they are intergrated in SA-MP.
Re: 2 Errors -
aoky - 26.01.2017
Quote:
Originally Posted by AjaxM
This is how it works:
PHP код:
public OnPlayerRequestSpawn(playerid) return SpawnPlayer(playerid);
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
// CODE HERE
return 1;
}
forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
// 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!
Re: 2 Errors -
AjaxM - 26.01.2017
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.
Re: 2 Errors -
aoky - 26.01.2017
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"
Re: 2 Errors -
GoldenLion - 26.01.2017
Update the includes and the server. Also you don't need to forward anything.
Re: 2 Errors -
aoky - 26.01.2017
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..