Anti-HH Screwed.
#1

Код HTML:
#define SetPlayerHealthEx(%0,%1) pHealth[%0] = floatround(%1); SetPlayerHealth(%0, floatround(%1));
#define SetPlayerArmourEx(%0,%1) pArmour[%0] = floatround(%1); SetPlayerArmour(%0, floatround(%1));

SetPlayerHealthEx(playerid, 75);
That is what i am making and getting the empty statement upon using it

Код HTML:
stock SetPlayerHealthEx(playerid, Float:health)
{
    SetPlayerHealth(playerid, health);
    pHealth[playerid] = health;
	return 1;
}

stock SetPlayerArmourEx(playerid, Float:armour)
{
	SetPlayerArmour(playerid, armour);
 	pHealth[playerid] = armour;
	return 1;
}

SetPlayerHealthEx(playerid, 75);
Converting it to stock.... No Errors
Reply
#2

Remove the ';' from the end of the #define line.

pawn Код:
#define SetPlayerHealthEx(%0,%1) pHealth[%0] = (%1), SetPlayerHealth(%0, (%1))
#define SetPlayerArmourEx(%0,%1) pArmour[%0] = (%1), SetPlayerArmour(%0, (%1))
Example:
pawn Код:
#define var(%0) Kick(%0);

public OnPlayerConnect(playerid)
{
    var(playerid); // Becomes 'Kick(playerid);;'
}
pawn Код:
#define var(%0) Kick(%0)

public OnPlayerConnect(playerid)
{
    var(playerid); // Becomes 'Kick(playerid);'
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)