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 again with variables :p

Help for those learning Tcl or writing their own scripts.
Post Reply
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Help again with variables :p

Post by garfwen »

How can i put a variable $var into another variable $var2 ?



set var "Hey"

set var2 { $::var <- need help with this variable }



Thanks,
GaRfWeN
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

This would be the easy answer:

Code: Select all

set var $var2
NML_375
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Post by garfwen »

Thats not what i mean,
like:

set var "Today"
set var2 "$var is a good day"

bindpub - !today today
proc today....


You know what I mean ?

sorry .. my english :S

GaRfWeN
d
dj-zath
Op
Posts: 134
Joined: Sat Nov 15, 2008 6:49 am
Contact:

Post by dj-zath »

this??

Code: Select all


set channel "#mychannel"
set var "whatever you want here"

bind pub - !today more

proc   more {args} {
       global $channel var varTemp

     set varTemp "$var is a great day"
     set var "$varTemp"

     putserv "PRIVMSG $channel $varTemp"
   return 0
}

Okay, I know its crude!

DjZ
:) :)
Post Reply