SA-MP Forums Archive
A weird warning. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A weird warning. (/showthread.php?tid=276154)



A weird warning. - Darnell - 12.08.2011

Quote:

foreach.inc(280) : warning 201: redefinition of constant/macro (symbol "foreach(%1,%2)")

Line 280:
pawn Код:
}
Uhmmm...I've added Y_Objects before that, does it matter ?

All of my includes :
pawn Код:
#include <a_samp>
#include <zcmd>
#include <Y_Objects>
#include <sscanf2>
#include <dini>
#include <dudb>
#include <dutils>
#include <core>
#include <float>
#include <OPVD>
#include <OPSP>



Re: A weird warning. - TouR - 12.08.2011

You have defined again foreach in your gamemode. Find it and remove it.


Re: A weird warning. - Tee - 12.08.2011

Maybe Y_Objects has foreach included in it, but I'm not sure if that can give that error.

EDIT: Tour15 beat me lol.


Re: A weird warning. - Darnell - 12.08.2011

Quote:
Originally Posted by tour15
Посмотреть сообщение
You have defined again foreach in your gamemode. Find it and remove it.
I found this in foreach.inc :
pawn Код:
#define foreach(%1,%2) \
    for (new %2 = YSI_gS%1; _:%2 != -1; %2 = YSI_gA%1[%2])
This in Y_objects.inc :
pawn Код:
#define foreach(%1,%2) \
    for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
What should I do ?


Re: A weird warning. - TouR - 12.08.2011

Delete the one at Y_objects.inc


Re: A weird warning. - Darnell - 12.08.2011

Quote:

D:\pawno\include\Y_objects.own(3091) : error 017: undefined symbol "foreach"
D:\pawno\include\Y_objects.own(3102) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(310 : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3111) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3112) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3115) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(311 : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(311 : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3119) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3121) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3124) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3126) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(312 : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3139) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3150) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3152) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3154) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3155) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3162) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3166) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3172) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3173) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3184) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3185) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3197) : error 017: undefined symbol "playerid"
D:\pawno\include\Y_objects.own(3200) : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Ummm...


Re: A weird warning. - MadeMan - 12.08.2011

Do you use the foreach.inc in your script?

If not, it could be defined in your script too.


Re: A weird warning. - Darnell - 12.08.2011

I just added foreach.inc and it works, lol.