Compile Error please help.
#1

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)
Reply
#2

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)
Reply
#3

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.
Reply
#4

#include <foreach>
Reply
#5

Quote:
Originally Posted by Ihateyou
Посмотреть сообщение
#include <foreach>
It's already there.
Reply
#6

You are using an older version of the foreach include i think

Try this
[pawn]
foreach (Player,i)
[/code]
Reply
#7

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.
Reply
#8

Bump.
Reply
#9

Try
pawn Код:
foreach (new i : Player)
Reply
#10

use y_iterate! (a newer version of foreach) it is included in YSI

and ****** said
pawn Код:
foreach(Player, i )
syntax is already deprecated use
pawn Код:
foreach(new i : Player)
now
Reply
#11

Quote:
Originally Posted by ShinichiKudou
Посмотреть сообщение
use y_iterate! (a newer version of foreach) it is included in YSI

and Y_Less said
pawn Код:
foreach(Player, i )
syntax is already deprecated use
pawn Код:
foreach(new i : Player)
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"
Reply
#12

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>
Reply
#13

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.
Reply
#14

Ok thanks guys i will try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)