SA-MP Forums Archive
Server Crashing Need Help!! - 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: Server Crashing Need Help!! (/showthread.php?tid=592585)



Server Crashing Need Help!! - Devon007 - 27.10.2015

When A Player Take Damage Server Is Crashing
Server Log:
Код:
[04:58:42] [debug] AMX backtrace:
[04:58:42] [debug] #0 00000014 in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=35.14145, weaponid=54, ...<1 argument>) at <unknown file>:0



Re: Server Crashing Need Help!! - AbyssMorgan - 27.10.2015

Show OnPlayerTakeDamage


Re: Server Crashing Need Help!! - Devon007 - 27.10.2015

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



Re: Server Crashing Need Help!! - itsCody - 27.10.2015

Replace it with

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    return 
1;

Same thing for OnPlayerGiveDamage

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart)
{
    return 
1;




Re: Server Crashing Need Help!! - feartonyb - 27.10.2015

Код:
issuerid=65535
means that issuer doesn't exists on the server.
To fix this use:

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart

    if(
issuerid != INVALID_PLAYER_ID)
    {
           
//your onplayertakedamage code
    
}
    return 
1

Same to OnPlayerGiveDamage:

PHP код:
public OnPlayerGiveDamage(playeriddamageidFloat:amountweaponidbodypart

    if(
damageid != INVALID_PLAYER_ID)
    {
           
//your onplayergivedamage code
    
}
    return 
1




Re: Server Crashing Need Help!! - Mencent - 27.10.2015

Hello!

@feartonyb:
What is that supposed to help? Only a if-statement don't help you...

@Devon007:
Which server-version do you use?


Re: Server Crashing Need Help!! - Devon007 - 30.10.2015

Not working still crashing
i am using 0.3.7