Use strcmp to compare 2 strings
#1

Hey
Now I know how to use GameTextForPlayer,I tryied to make a different text if the cop kill you (GTA style )
Si,I got that:
Code:
	new string[50];
	if(GetPlayerTeam(killerid) == "TEAM_COP")
	{
	  format(string, sizeof(string), "BUSTED");
	}
	else
	{
	  format(string, sizeof(string), "WASTED");
	}
  GameTextForPlayer(playerid, string, 3000, 2);
It gives me
Code:
error 033: array must be indexed (variable "-unknown-")
on the If line

I read that i got to use strcmp to compare 2 strings,but how can i do it?
Code:
if(strcmp(I don't know what to put here))
Thanks in advance
Reply


Messages In This Thread
Use strcmp to compare 2 strings - by TimBuk.Ekh - 18.04.2009, 20:16
Re: Use strcmp to compare 2 strings - by yom - 18.04.2009, 20:39
Re: Use strcmp to compare 2 strings - by TimBuk.Ekh - 18.04.2009, 20:42
Re: Use strcmp to compare 2 strings - by Francis[French] - 18.04.2009, 21:38
Re: Use strcmp to compare 2 strings - by TimBuk.Ekh - 18.04.2009, 21:42
Re: Use strcmp to compare 2 strings - by Francis[French] - 18.04.2009, 21:44
Re: Use strcmp to compare 2 strings - by Stakline - 21.06.2010, 21:31
Re: Use strcmp to compare 2 strings - by Joe_ - 21.06.2010, 21:34

Forum Jump:


Users browsing this thread: 1 Guest(s)