Godot Version
globalvar.array=[[3, “String”, 3, 4, “String”],[2, “String”, 3, 4, “String”]]
globalvar.array[0][0]=4444
Question
I think this is a very basic question, sorry about asking, but I have been stuck with this for hours. I’ve checked lots of different websites also, including the official docs, but I simply can’t get it to work.
So I have a 2D array defined as a global variable. It looks like the one above. I simply wish to change one value manually but I get this error message:
Invalid set index ‘0’ (on base: ‘array’) …
However, if I simply try
print (globalvar.array[0][0])
I get 3
I can also print the array fine.
So how do you simply change a value manually?
I’m using godot 4
Thanks!