Array Help

var UnitHolder : GameObject;
UnitHolder.add(Player1);

MissingMethodException: Method not found: ‘UnityEngine.GameObject.add’.
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher ()
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.Create ()
Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object args)
Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object args)
Boo.Lang.Runtime.RuntimeServices+c__AnonStorey12.<>m__6 ()
Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.Invoke (System.Object target, System.String name, System.Object args)
UnityScript.Lang.UnityRuntimeServices.Invoke (System.Object target, System.String name, System.Object args, System.Type scriptBaseType)
Field.Start () (at Assets/Scriptes/Field.js:44)

what am i doing wrong

The problem is that there is no such thing as an ‘add’ method for builtin arrays. I’m honestly not sure what made you think there was one, but let’s not go there just now.

If you want easy array manipulation, I would recommend using the System.Collections.Generic.List class from the .net libraries, or if you’re not comfortable with that, Unity has an internal dynamic ‘array’ class. I don’t recommend using it for things where you need a lot of speed, but it’s easy to use.