stevenjm Voice
Joined: 16 May 2006 Posts: 2 Location: Johannesburg, South Africa
|
Posted: Thu Jun 08, 2006 7:33 am Post subject: "uniformly" randomizing arrays |
|
|
Hi all
I have the following set ...
| Code: | set acrosbynum([expr [array size acrosbynum]+1]) $text
set acrosbyname([strlwr $nick]) $text
set acrorealnames([strlwr $nick]) $nick
set acronumsbyname([strlwr $nick]) [array size acrosbynum]
set acronamesbynum([array size acrosbynum]) [strlwr $nick] |
Now ... the problem is when this displays to the channel later on ... each user that submitted first - will always be displayed first ... i wish to change this.
| Code: | while {$_i<=[array size acrosbynum]} {
putmsg $acrochan "$_i. [strlwr $acrosbynum($_i)]"
set acrovotes($_i) 0
incr _i
} |
I am able to change randomise the acrosbynum etc induviualy, but it will put everything out of sync.
Does anyone have a suggestion for this ... i know its way beyond my current scope of knowledge  |
|