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.

Problem with script

Old posts that have not been replied to for several years.
Locked
k
kk-
Voice
Posts: 26
Joined: Sat Aug 09, 2003 10:31 am
Location: uk

Problem with script

Post by kk- »

i had a multi script that work fine on my old shell but now the script gives me loads off errors on my new shell am not sure if it is a tcl version problem.. my shells current tcl is Tcl library: /usr/lib/tcl8.5
Tcl version: 8.5a2 (header version 8.4.5) i am unable to change this but would like to run my old version off my script heres an example off an error.


<ChanBosS> [18:09] Tcl error [pub_cd]: wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"

is there anyone who got the time to look at the tcl n advice me if it can be changed to work on new shell, please let me know
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

type .set errorInfo and post the full error traceback

alternatively, install the Tcl version your script works with in your home dir for your private use
k
kk-
Voice
Posts: 26
Joined: Sat Aug 09, 2003 10:31 am
Location: uk

Post by kk- »

<kk-> .set errorInfo
<CyBorg> [18:57] #kk-# set errorInfo
<CyBorg> Currently: wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"
<CyBorg> Currently: while executing
<CyBorg> Currently: "switch $cmd {
<CyBorg> Currently: }"
<CyBorg> Currently: (procedure "pub_cd" line 942)
<CyBorg> Currently: invoked from within
<CyBorg> Currently: "pub_cd $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"

is when i use a public cmd status
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well, obviously your switch (it's actually a Tcl command, just like all other control structures in Tcl) doesn't conform to switch syntax
Locked