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



Damaged - MyUndiesSmell - 28.03.2017

Hello, I'm trying to make the script check if the player has taken damage recently before going to a DM arena. I'm getting an error.

Код:
error 029: invalid expression, assumed zero
Код:
if(damaged[playerid] == 0)
		DM1(playerid);
		SendClientMessage(playerid, -1, "{F81414}[INFO]{FFFFFF} Remember use /lobby when you want to leave! Good luck!");
                {
		else //This line is where I receive the error
                }
		SendClientMessage(playerid, COLOR_SERVER, "SERVER: {ffffff}You have recently taken damage!");



Re: Damaged - Vince - 28.03.2017

Braces! Use them!


Re: Damaged - MyUndiesSmell - 28.03.2017

Added still same error.


Re: Damaged - jasperschellekens - 28.03.2017

PHP код:
    if(damaged[playerid] == 0)
    {
        
DM1(playerid);
        
SendClientMessage(playerid, -1"{F81414}[INFO]{FFFFFF} Remember use /lobby when you want to leave! Good luck!");
    }else return 
SendClientMessage(playeridCOLOR_SERVER"SERVER: {ffffff}You have recently taken damage!");