Multi level array issue

Hi there,

The following code works.

var topRoomArray = new Array();
topRoomArray[0]   = new Array("value-1", new Array());
topRoomArray[0][1]= new Array ("value-2-1", "value-2-2", "value-2-3");

But if I take “var” out from the first line (with the intention of making it as a global array] then it gets me some error

topRoomArray = new Array();
topRoomArray[0]   = new Array("value-1", new Array());
topRoomArray[0][1]= new Array ("value-2-1", "value-2-2", "value-2-3");

What if you use the proper way of declaring runtime global variables?

globals.topRoomArray = new Array();

Paul

I changed my code to

globals.topRoomArray = new Array();
globals.topRoomArray[0]   = new Array("value-1", new Array());
globals.topRoomArray[0][1]= new Array ("value-2-1", "value-2-2", "value-2-3");

same issue occurs

what error do you get?

org.mozilla.javascript.EvaluatorException: The undefined value has no properties (_test, line 4)