SA-MP Forums Archive
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: Help (/showthread.php?tid=544592)



Help - DeathMatchEnFrancais - 02.11.2014

Hello I am an anti-kill-team me and make mistakes

Код HTML:
forward OnPlayerTakeDamage(playerid);
public OnPlayerTakeDamage(playerid, damagedid, Float: amount, weaponid)
{
    new Float:HP;
	GetPlayerHealth(damagedid, HP);
 	if(TEAM_AT[playerid] == 1 && TEAM_AT[damagedid] == 1)
	{
		SetPlayerHealth(damagedid, HP-0);
	}
	if(TEAM_TERRO[playerid] == 1 && TEAM_TERRO[damagedid] == 1)
	{
		SetPlayerHealth(damagedid, HP-0);
	}
    return 1;
}
Код HTML:
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1700) : error 025: function heading differs from prototype
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1704) : error 029: invalid expression, assumed zero
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1704) : error 029: invalid expression, assumed zero
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1704) : warning 215: expression has no effect
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1704) : error 001: expected token: ";", but found "]"
C:\Users\Yamaha\Desktop\Counter Strike samp 0.3z\gamemodes\css.pwn(1704) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.



AW: Help - rospar - 02.11.2014

Remove this its already includet in a_samp
Код:
forward OnPlayerTakeDamage(playerid);



Re: Help - [HiC]TheKiller - 02.11.2014

1. Make sure you check that damagedid isn't INVALID_PLAYER_ID before you start checking variables with it.
2. Make sure that TEAM_AT is a created variable.


Re : Help - DeathMatchEnFrancais - 03.11.2014

I do not understand the team exists and when I removed forward OnPlayerTakeDamage (playerid); toujour errors