SA-MP Forums Archive
HELP PROBLEM WITH foreach 0.4.3 - 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: HELP PROBLEM WITH foreach 0.4.3 (/showthread.php?tid=638706)



HELP PROBLEM WITH foreach 0.4.3 - Jastak - 05.08.2017

I have a problem with the foreach when creating a new iterator, it works fine with the normal iterator but when I want to test with IteratorArray because it is going to suck, I have been seeing that it would be wrong in the foreach code and even in my code but so As such I can not find the solution.

ERROR:
Код:
(718) : error 001: expected token: "-identifier-", but found "-integer value-"
Код:
new IteratorArray:InEdificio[MAX_EDIFICIORENTA]<MAX_PLAYERS>;
Check if there was a problem with the declaration of MAX_EDIFICIORENTA but okay, try instead of putting the constant numbers directly ...

Код:
new IteratorArray:InEdificio[10]<109>; // cambiй el MAX_PLAYERS a 109...
... but I still got the same error, as I said in the title I use the foreach 0.4.3


Re: HELP PROBLEM WITH foreach 0.4.3 - crukk11 - 05.08.2017

i think like this

PHP код:
new IteratorArray:InEdificio[MAX_EDIFICIORENTA][MAX_PLAYERS]; 



Re: HELP PROBLEM WITH foreach 0.4.3 - Jastak - 05.08.2017

Quote:
Originally Posted by crukk11
Посмотреть сообщение
i think like this

PHP код:
new IteratorArray:InEdificio[MAX_EDIFICIORENTA][MAX_PLAYERS]; 
No, that's not what I mean. You have to see foreach, it's a statement

Код:
#define IteratorArray:%1[%2]<%3> %1@YSII_Cg[%2],%1@YSII_Ag[%2][%3+1]
"foreach.inc, line 268, version 0.4.3, https://sampforum.blast.hk/showthread.php?tid=570868"

That is, I do not mean, I do not want to create a normal multidimensional array