This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

(2dimensional) arrays

Old posts that have not been replied to for several years.
Locked
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

(2dimensional) arrays

Post by arcane »

ive got the following problem:

i want my voting script to support 1 vote per channel. so i turned every variable into an array. theres only one problem:
the people who already voted are already stored in an array. so i searched the forum and changed it to:

Code: Select all

vpeople($chan,$mask)
but when ending a vote, ill have to unset all voted people for this specific chan. ie i want to unset vpeople(#chan,<all>). is there _any_ way to do this? - with arrays or without.
and then 2 more questions:
1. is there a way to go through an array such as for lists: foreach item
  • ?
    2. is it possible to make an array of lists?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

http://tcl.activestate.com/man/tcl8.4/TclCmd/array.htm
go there and read about "array get" and "array names"
Elen sila lúmenn' omentielvo
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

uhm, seems to be pretty easy :D
little arcane learns arrays *g*

guess i start liking tcl ;)
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked