This is the new home of the 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.

[discussion] invalid command name "clock"

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

[discussion] invalid command name "clock"

Post by TCL_no_TK »

I've recently upgrade my eggdrops to latest cvs release, and not had any problems with them (in fact they're alot better :P) but i found 2 of them have started getting this error
[23:31:35] <me> .set errorInfo
[23:31:35] <eggie> [00:31] #me# set errorInfo
[23:31:35] <eggie> Currently: invalid command name "clock"
[23:31:35] <eggie> Currently: while executing
[23:31:35] <eggie> Currently: "clock seconds"
[23:31:35] <eggie> Currently: "pub:ban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
[23:31:45] <me> .tcl clock seconds
[23:31:45] <eggie> Tcl error: invalid command name "clock"
[23:32:22] <me> .tcl info tclversion
[23:32:22] <eggie> Tcl: 8.5
Now, clock is a valid tcl command, and i've seen it mentioned in an other post anyone got any information or insight in to this? I had a browse of some of the pages google came up with.

P.S i have "solved" (removed the use clock from the script) this, but would like more information on this! thats why its not in the other forums x
Posts: 6
Joined: Thu Jan 10, 2008 8:16 am

Post by chasba »


I am also seeing this problem in several of MC_8's scripts. The Egg is running 1.6.19+ctcpfix with TCL 8.5.8

May I ask if you just removed clock from the scripts or did you replace it with something else?

For example, with

Code: Select all

"[list [list [clock seconds] $command $args]] $::lastCommand"
How would you resolve this?
User avatar
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

The clock command was recently made an ensemble. It is set up from init.tcl, so if you messed up your tcl installation (by e.g. loading some old init.tcl), it won't work. Fix: Don't mess up the installation :wink:
Have you ever read "The Manual"?
Post Reply