Iterator (foreach)
#1

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?!
Reply
#2

Take a look here: https://sampforum.blast.hk/showthread.php?tid=92679
Reply
#3

Quote:
Originally Posted by Cypress
View Post
pawn Code:
new IteratorArray:Vehicle[4]<20>;


//Local
Iter_Init2(Vehicle);
Iter_Add2(Vehicle, 1, 20);


Take a look here: https://sampforum.blast.hk/showthread.php?tid=92679
What do you mean huh?
Look at my code, that's an example code from Y_Less.
Reply
#4

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));
Reply
#5

Quote:
Originally Posted by Cypress
View Post
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.
Reply
#6

Full code? Or have you tried it in blank GM?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)