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.
Help for those learning Tcl or writing their own scripts.
Fill
Halfop
Posts: 80 Joined: Sun Jan 18, 2009 6:08 pm
Post
by Fill » Sun Jul 12, 2009 9:25 am
Hi,
I have a script that works with userfiles and I wanted to be able to use addhost command. However, I get this error:
[15:10] Tcl error [users]: invalid command name "addhost"
What's going on?
Last edited by
Fill on Tue Jul 14, 2009 3:33 am, edited 1 time in total.
while
Voice
Posts: 34 Joined: Sat Jul 11, 2009 9:05 am
Location: beat mort
Post
by while » Sun Jul 12, 2009 9:47 am
maybe if you paste the code of the script someone can tell what is wrong
arfer
Master
Posts: 436 Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK
Post
by arfer » Sun Jul 12, 2009 10:12 am
There is no such Eggdrop Tcl command as addhost.
This is what you need :-
setuser <handle> <entry-type> [extra info]
Look it up in tcl-commands.doc or tcl-commands.html, which you can find in your bot's docs.
The obvious alternative is to define a proc named addhost which uses the above setuser command. You can then call addhost.
I must have had nothing to do
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Sun Jul 12, 2009 3:16 pm
You need to load compat.tcl and alltools.tcl before any other scripts. They are situated in scripts folder of your bot. That is the librarys with many useful commands, like addhost.
Fill
Halfop
Posts: 80 Joined: Sun Jan 18, 2009 6:08 pm
Post
by Fill » Tue Jul 14, 2009 3:32 am
thanks for the great replies guys, everything was solved after loading compat.tcl
@ arfer:
Maybe I should update the script and make it use the new command?
See ya