error 029: invalid expression, assumed zero
#1

Код:
else
	{
		if(PlayerData[playerid][pFactionDuty] && GetPlayerFactionType(playerid) == FAC_TYPE_MEDIC)
		{
        	COLOR_TEMP = 0xDC6A78FF;
		}
		else
		{
	    	COLOR_TEMP = COLOR_WHITE;
	    }
	}
else // This is where the only mistake I strip
	{
		if(PlayerData[playerid][pFactionDuty] && GetPlayerFactionType(playerid) == FAC_TYPE_POLICE)
		{
        	COLOR_TEMP = 0x2288FFFF;
		}
		else
		{
	    	COLOR_TEMP = COLOR_WHITE;
	    }
	}
Reply
#2

else checks if something has failed, so pretty much you are checking if something has failed twice.

https://sampwiki.blast.hk/wiki/Control_Structures#else
Reply
#3

Quote:
Originally Posted by Shura
Посмотреть сообщение
Код:
else if(PlayerData[playerid][pFactionDuty] && GetPlayerFactionType(playerid) == FAC_TYPE_MEDIC)
{
	COLOR_TEMP = 0xDC6A78FF;
}
else if(PlayerData[playerid][pFactionDuty] && GetPlayerFactionType(playerid) == FAC_TYPE_POLICE)
{
	COLOR_TEMP = 0x2288FFFF;
}
else
{
	COLOR_TEMP = COLOR_WHITE;
}
This will fix your problem and looks nicer
Rep me if this helped you, thanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)