Difference between revisions of "MUDL:array shuffle"

From SlothMUD Wiki
Jump to: navigation, search
(Created page with " __TOC__ = Summary = {|class="abilitiestable" border="0" cellspacing="0" cellpadding="0" ! Function Name | array_shuffle |- ! Settable | No |- ! Returns | Array |} {|clas...")
 
(No difference)

Latest revision as of 21:48, 7 November 2018


Summary

Function Name array_shuffle
Settable No
Returns Array


Parameter Options
Array (of any type)


This function takes the input array and returns a new array with the previous elements randomly shuffled.


Example

setproc <parent> # on_foo
foreach(array_shuffle(range(1, 10)), %9,
(
    msg_room(%room, '' + %9)
)),

return(true)