Foreach - Multidimensional Array
#1

EDIT: Iter_Init (F_ObjetWhere); ON THE GAMEMODEINIT()!

Hi,

I trying to create a multidimensional array, but i've a problem !

pawn Код:
new Iterator:F_ObjetWhere[5]<20>;
The compilation is ok, but when i go in game, the server flood SendClientMessage's...

Do you have an idea?
Thank you
Reply
#2

I've not use Iter_Init(), so when i've do a debug, the loop is infinite.

But, I repaired this problem, and I have a another problem.

pawn Код:
new Iterator:F_PocheList[MAX_PLAYERS][MAX_PERSOS];
new Iterator:F_PocheID[MAX_PLAYERS][MAX_PERSOS][MAX_OBJETS_ID];

public OnGameModeInit()
{
        Iter_Init(F_PocheList); // ERRORS ARE HERE
        Iter_Init(F_PocheID);
}
Quote:

C:\Users\UnJuif\Desktop\GM\gamemodes\base.pwn(90) : error 017: undefined symbol "F_PocheList@YSII_Ag"
C:\Users\UnJuif\Desktop\GM\gamemodes\base.pwn(90) : error 017: undefined symbol "F_PocheList@YSII_Ag"
C:\Users\UnJuif\Desktop\GM\gamemodes\base.pwn(90) : error 017: undefined symbol "F_PocheList@YSII_Ag"
C:\Users\UnJuif\Desktop\GM\gamemodes\base.pwn(90) : fatal error 107: too many error messages on one line

I really need Multidimensional array, and I love foreach, it's very very practice !

Thank you for your help ******
Reply
#3

I doubt F_PocheID can be done with foreach. About the F_PocheList:
pawn Код:
new Iterator:F_PocheList[MAX_PLAYERS]<MAX_PERSOS>;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)