SA-MP Forums Archive
Multiple strings in an enumerator. - 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: Multiple strings in an enumerator. (/showthread.php?tid=169106)



Multiple strings in an enumerator. - CaHbKo - 18.08.2010

Hi,

I have, for example, this enumerator:
pawn Код:
enum JOBPLACE
{
    ...
    Worker[MAX_PLAYER_NAME],
    ...
}
new Job[10][JOBPLACE];
As you can see, I have the worker's name on some job. Sometimes I'll need to loop through all workers, so I do this:
pawn Код:
enum JOBPLACE
{
    ...
    Worker[20][MAX_PLAYER_NAME],
    ...
}
new Job[10][JOBPLACE];
But compiler wont allow me to do this.
Why? And is there another way?


Re: Multiple strings in an enumerator. - dice7 - 18.08.2010

pawn is limited to 3d arrays only


Re: Multiple strings in an enumerator. - CaHbKo - 18.08.2010

Quote:
Originally Posted by dice7
Посмотреть сообщение
pawn is limited to 3d arrays only
So the only way is this?
pawn Код:
new Job_Worker[MAX_JOBS][20][MAX_PLAYER_NAME];