NTSL Scripts: Difference between revisions

402 bytes removed ,  20:14, 6 August 2013
→‎Recursive Implode: Recusion isn't recommended, use the loop implode instead.
imported>VistaPOWA
(copied from old wiki)
imported>Giacom
(→‎Recursive Implode: Recusion isn't recommended, use the loop implode instead.)
Line 564: Line 564:
  }  
  }  


===Recursive Implode===
Same as above, but does it recursively and only takes one argument (a vector)
//recursive implode function, takes a vector and
//combines each member into a string with a space to separate
//by perogi
def implode($vector)
{
$str = at($vector, 1);
remove($vector, $str);
if(length($vector) > 0)
{
$str += " ";
$str += implode($vector);
}
return $str;
}
===Broadcast All===
===Broadcast All===


Anonymous user