Here's an example:
Global script
struct Type1 {
int list;
int position;
};
Type1 letter[2];
struct Type2 {
int entries[20];
};
Type2 lists[10];
on_key_press
// init values for this example
letter[1].list = 1;
letter[1].position = 5;
lists[1].entries[5] = 666;
int result = lists[letter[1].list].entries[letter[1].position];
Display("%d", result); // returns 0
int templist = letter[1].list;
int tempposition = letter[1].position;
result = lists[templist].entries[tempposition];
Display("%d", result); // returns 666
It's not a problem since there's an easy workaround, but I'm curious as to why it behaves this way?
EDIT: Fixed since v2.62 Beta 1
heh, that is wierd. funny thing is, this works:
int result = lists[letter[1].list].entries[5];
Display("%d", result); // returns 666
Hehe, yet another reason why arrays and structs are unofficial.
Interesting, I'll look into it.