You should try a minimal code example:
Take away all other scripts from your map and only leave this part in there and see if the result is still the same.
If it is then it's probably an Andromeda issue. At least I can't see how this is caused by normal code if said minimal code example is still faulty.
Static { } means it will start on map startup during initialization. It should say in the debugger window 1 then 1 but it shows 1 then 2... please have a look. The code in galaxy format is in the imports as Andromeda.galaxy.
Perhaps this is due with the fact that I'm coding in Andromeda, but here is the problem anyway.
class foo {
int x;
}
foo[2][2] a;
... and then somewhere...
a[1][1].x = 1;
UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, IntToString(a[1][1]));
a[1][2].x = 2;
UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, IntToString(a[1][1]));
It should say: 1 and then 1... right? Why does it show me 1, 2? or do they share the same x?
Well, they shouldn't.
You should try a minimal code example: Take away all other scripts from your map and only leave this part in there and see if the result is still the same.
If it is then it's probably an Andromeda issue. At least I can't see how this is caused by normal code if said minimal code example is still faulty.
edit: scratch that... Here is a new map with only a sample code showing the problem.
Static { } means it will start on map startup during initialization. It should say in the debugger window 1 then 1 but it shows 1 then 2... please have a look. The code in galaxy format is in the imports as Andromeda.galaxy.
@Vermore: Go
You'll have to show us what it compiles to in native Galaxy as well, if you can.
Yeah its in the map as imports.
Thanks though, I managed to fix it... I'm so stupid that I didn't make a new instance, which is why the values are shared despite not being static.
That is the proper way of doing it... which gives me 1, 1. I should read the language specification more...