Can't get multi dimensional arrays to work
doesn't work:
works fine:
LONG NORMAL_TIMELINE_TIMES_1[] = {10000,10001,10002,10003}
LONG NORMAL_TIMELINE_TIMES_2[] = {10000,10001,10002,10003}
LONG NORMAL_TIMELINE_TIMES_3[] = {10000,10001,10002,10003}
LONG NORMAL_TIMELINE_TIMES_4[] = {10000,10001,10002,10003}
LONG NORMAL_TIMELINE_TIMES[][] = { NORMAL_TIMELINE_TIMES_1,NORMAL_TIMELINE_TIMES_2,NORMAL_TIMELINE_TIMES_3,NORMAL_TIMELINE_TIMES_4}
works fine:
INTEGER My3DArray[5][3][4] =
{
{
{1,2,3,4},
{5,6,7,8},
{9,10,11}
},
{
{13,14}
}
}
0
Comments
I'm pretty sure I try to do this every time I start a new project after not using AMX for a while.
Did you ever get that working last time by just filling the variable array at DEFINE_START?
PhreaK and Vining's suggestion should work.
--John
DEFINE_CONSTANT
INTEGER foo1 = 1
INTEGER foo2 = 2
INTEGER foo3 = 3
INTEGER bar[] = {foo1, foo2, foo3, foo4}
It's just when you get more dimensions it starts breaking. I think?
I don't want to make these variables. These aren't variable; They are constant, immutable.