egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"uniformly" randomizing arrays

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
stevenjm
Voice


Joined: 16 May 2006
Posts: 2
Location: Johannesburg, South Africa

PostPosted: Thu Jun 08, 2006 7:33 am    Post subject: "uniformly" randomizing arrays Reply with quote

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 Sad
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber