Iterator (foreach) - 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: Iterator (foreach) (
/showthread.php?tid=287275)
Iterator (foreach) -
letters - 02.10.2011
pawn Code:
new IteratorArray:Vehicle[4]<20>;//Global
//Local
Iter_Init(Vehicle);
Iter_Add(Vehicle[0],1);//Error line
Code:
C:\Documents and Settings\User\Desktop\GM\pawno\include\asd.pwn(88) : error 017: undefined symbol "Vehicle"
C:\Documents and Settings\User\Desktop\GM\pawno\include\asd.pwn(88) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\GM\pawno\include\asd.pwn(88) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\User\Desktop\GM\pawno\include\asd.pwn(88) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\GM\pawno\include\asd.pwn(88) : fatal error 107: too many error messages on one line
ftw?!
Re: Iterator (foreach) -
Cypress - 02.10.2011
Take a look here:
https://sampforum.blast.hk/showthread.php?tid=92679
Re: Iterator (foreach) -
letters - 02.10.2011
Quote:
Originally Posted by Cypress
|
What do you mean huh?
Look at my code, that's an example code from Y_Less.
Re: Iterator (foreach) -
Cypress - 02.10.2011
I mean this:
pawn Code:
new IteratorArray:Vehicle[4]<20>;
Iter_Init(Vehicle);
Iter_Add(Vehicle[0], AddStaticVehicle(454, -1364.0269, 1470.2139, 0.3568, 165.0191, -1, -1));
Re: Iterator (foreach) -
letters - 02.10.2011
Quote:
Originally Posted by Cypress
I mean this:
pawn Code:
new IteratorArray:Vehicle[4]<20>;
Iter_Init(Vehicle);
Iter_Add(Vehicle[0], AddStaticVehicle(454, -1364.0269, 1470.2139, 0.3568, 165.0191, -1, -1));
|
No difference. Same errors.
I'm using YSI 3.0 y_iterator.inc btw.
Re: Iterator (foreach) -
=WoR=Varth - 03.10.2011
Full code? Or have you tried it in blank GM?