I’m just learning and I wanted to do something simple so I figured making an array grid in javascript would be easy enough. However, no matter what I do I keep getting the error ArguementOutOfRangeException. Any advice of information on what I did wrong would be greatly appreciated.
P.S I’m sure that there’s a more efficient way of doing this, like with lists or something, but I’m trying to practice with arrays.
#pragma strict
public var iMax = 10;
public var jMax = 10;
public var f : [];
public var i: int;
public var j : int;
function Start ()
{
for (i=0;i < iMax;i++)
{
f*= [];*
-
for (j=0; j < jMax; j++)*
-
{*
_ Debug.Log (f*[j]);_
_ }_
_ }_
_}*_
I have this script attached to a random object, I figured it would work on anything but maybe I’m wrong.