Chaos 0 Posted May 5, 2008 I will add a specified target to array. But i don´t know anymore how to do it. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehlist = ["T72","BMP2","ZSU"]; _targlist =[]; #loopY ~_wt ~.25 +random .25 _candidate = typeOf (list _trg select _n); ? _candidate in _vehlist : _targlist = (list _targlist) + _candidate; Only the last line will response me a bug: "type array waiting for object". <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_targlist = _targlist + _candidate doesn´t works too. Share this post Link to post Share on other sites
i0n0s 0 Posted May 5, 2008 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_targlist = _targlist + [_candidate] You can only add arrays, so you have "convert" the object to an array before adding. Share this post Link to post Share on other sites