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 with mysqltcl

Help for those learning Tcl or writing their own scripts.
Post Reply
j
jim1568
Voice
Posts: 1
Joined: Tue Sep 09, 2008 8:38 am

help with mysqltcl

Post by jim1568 »

i use mysqltcl for eggdrop to connect my db(in windows)
it always showed this error

Tcl error [ms:groupnukes]: can't read "mysql_(handle)": no such variable

the code as below:


set mysql_(handle) [mysqlconnect -host $mysql_(host) -user $mysql_(user) -password $mysql_(password) -db $mysql_(db)]

anybody can give some advice
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: help with mysqltcl

Post by speechles »

jim1568 wrote:i use mysqltcl for eggdrop to connect my db(in windows)
it always showed this error

Tcl error [ms:groupnukes]: can't read "mysql_(handle)": no such variable

the code as below:


set mysql_(handle) [mysqlconnect -host $mysql_(host) -user $mysql_(user) -password $mysql_(password) -db $mysql_(db)]

anybody can give some advice

Code: Select all

set ::mysql_(handle) [mysqlconnect -host $::mysql_(host) -user $::mysql_(user) -password $::mysql_(password) -db $::mysql_(db)]
You probably want to consider using global variables instead of local. Notice the use of :: to represent this. Might also want to hide the fact your using it for warez purposes, "groupnukes"...
Post Reply