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.

.next

Old posts that have not been replied to for several years.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Using that set voicelist lappend $voicelist $nick I get this error:
TCL error [next:add]: wrong # args: should be "set varName ?newValue?"

Any sugestions?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Suggestion: re-read my post :smile:

It's just "lappend voicelist $nick"

You don't need "set" at all.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oups.. I didn't read very carefuly what you wrote.. sorry.. thanks for the warning. :smile:

Can you recomand me something for that place counting?

Thanks!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Weee.. finished.. :smile: Works very fine.. Thanks mate! Now I got to think to a way to do that counting. :smile:
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

For place counting, just add 1 to the place before you send it... that'll change it from "0" to "1"
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Can you be more specific please?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Code: Select all

set place [lsearch -exact $voicelist $nick]

putserv "PRIVMSG $nick :you are the $place in the voice list."

You said the problem was that it starts at 0, not 1. So add 1 to the place before you send it. That'll make it start at 1.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I see, and where to add that 1?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Add 1 to place.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Please be more specific. Where to add that 1? I didn't understand where to add that 1. Explain please. Thanks!
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

You have a variable called "place" right? It was in the code you posted.

Add 1 to it.

incr place
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

set place [lsearch -exact $voicelist $nick]
putserv "PRIVMSG $nick :you are the $place in the voice list."

Well, the $place results from extraction of the position of the $nick from the $voicelist. I didn't put no other $place.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yes, now add "incr place" to your code, right inbetween those two lines.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Just a simple "incr place" or how?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

I give up lol.

If you want me to fix it for you, send me $10 (US) and I'll do it all myself :)
Locked