must be lvalue (non-constant)
#1

Код:
CMD:stats(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		new
			string[ 128 ],
			Age = PlayerInfo[ playerid ][ pAge ],
			Money = GetPlayerCash( playerid )
		;

		new Sex[20];
		new Faction[20];
	    if(PlayerInfo[ playerid ][ pFaction ] == 1) { Faction = "LSPD"; }
		if(PlayerInfo[ playerid ][ pSex ] == 1) { Sex = "Male"; }
		else if(PlayerInfo[ playerid ][ pSex ] == 2) { Sex = "Female"; }

		SendClientMessage(playerid, COLOR_LIGHTBLUE, "------------------------------------------------------------------------");
		format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s", RPName(playerid), Money, Age, Sex);
		SendClientMessage(playerid, COLOR_GRAD2, string);
	}
	return 1;
}
Any idea whats wrong? the error is on line


Код:
if(PlayerInfo[ playerid ][ pFaction ] == 1) { Faction = "LSPD"; }
Reply
#2

nvm fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)