Compile Error please help. -
1FreeHost - 03.08.2014
I get these errors
when trying to compile
Код:
C:\Users\Downloads\samp03z_svr_R1_win32\pawno\cod6v3.pwn(4686) : error 017: undefined symbol "foreach"
C:\Users\Downloads\samp03z_svr_R1_win32\pawno\cod6v3.pwn(4686) : error 029: invalid expression, assumed zero
C:\Users\Downloads\samp03z_svr_R1_win32\pawno\cod6v3.pwn(4686) : error 017: undefined symbol "Player"
C:\Users\Downloads\samp03z_svr_R1_win32\pawno\cod6v3.pwn(4686) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
And that line is:
Код:
foreach(new i: Player)
Re: Compile Error please help. -
iOxide - 03.08.2014
Well, i guess its because the foreach syntax is wrong? I have foreach(Player, i) syntax and when i used foreach(new i: Player) it gave me the same error as yours. Try using foreach(Player, i) (Just my opinion tho)
Re: Compile Error please help. -
1FreeHost - 03.08.2014
Quote:
Originally Posted by iOxide
Well, i guess its because the foreach syntax is wrong? I have foreach(Player, i) syntax and when i used foreach(new i: Player) it gave me the same error as yours. Try using foreach(Player, i) (Just my opinion tho)
|
Nope didn't work.
Thanks anyways.
Re: Compile Error please help. -
Ihateyou - 03.08.2014
#include <foreach>
Re: Compile Error please help. -
1FreeHost - 03.08.2014
Quote:
Originally Posted by Ihateyou
#include <foreach>
|
It's already there.
Re: Compile Error please help. -
Dj_maryo1993 - 03.08.2014
You are using an older version of the foreach include i think
Try this
[pawn]
foreach (Player,i)
[/code]
Re: Compile Error please help. -
1FreeHost - 03.08.2014
Quote:
Originally Posted by Dj_maryo1993
You are using an older version of the foreach include i think
Try this
[pawn]
foreach (Player,i)
[/code]
|
Already tried that code like i said.
Re: Compile Error please help. -
1FreeHost - 04.08.2014
Bump.
Re: Compile Error please help. -
Stinged - 04.08.2014
Try
Re: Compile Error please help. -
ShinichiKudou - 04.08.2014
use y_iterate! (a newer version of foreach) it is included in YSI
and ****** said
syntax is already deprecated use
now
Re: Compile Error please help. -
Stinged - 04.08.2014
Quote:
Originally Posted by ShinichiKudou
use y_iterate! (a newer version of foreach) it is included in YSI
and Y_Less said syntax is already deprecated use now
|
foreach IS y_iterate. Everything is the same.
The error he's getting is probably because he didn't add a space after "new i" and just wrote "new i: Player"
Re: Compile Error please help. -
ShinichiKudou - 04.08.2014
yep maybe
he is using the old foreach he said it
he said he has #include <foreach>
but he should use #include <YSI\y_iterate>
Re: Compile Error please help. -
Stinged - 04.08.2014
Not really. Go to the foreach page.
You can use foreach or y_iterate. They're the EXACTLY the same (Including version)
y_iterate is just foreach renamed because it was added to YSI lib.
Re: Compile Error please help. -
1FreeHost - 04.08.2014
Ok thanks guys i will try it.