SA-MP Forums Archive
Enum with string-type values - 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: Enum with string-type values (/showthread.php?tid=606520)



Enum with string-type values - cdoubleoper - 05.05.2016

Hi. I've got an enumerator which contains strings that I'm tryna loop. The thing is, I'm getting Tag Mismatch all the time, what the heck is going on?

Код:
	for(new i = 0; i < 10; i++)
	{
		if(Inventory[playerid][i] < 1) //Tag Mismatch won't appear if we put the name of the value instead of 'i' or any other integer which should actually work properly in this case
		{

//----------

enum pitems{It0[32],It1[32],It2[32],It3[32],It4[32],It5[32],It6[32],It7[32],It8[32],It9[32]}
Never had this kinda issue.
Anyone please?


Re: Enum with string-type values - Kimble - 05.05.2016

I think you forgot the tag here:

Код:
if(Inventory[playerid][pitems:i] < 1)