egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help again with variables :p

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Mon Nov 17, 2008 7:07 pm    Post subject: Help again with variables :p Reply with quote

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



set var "Hey"

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



Thanks,
GaRfWeN
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Nov 17, 2008 7:12 pm    Post subject: Reply with quote

This would be the easy answer:
Code:
set var $var2

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
garfwen
Halfop


Joined: 12 Mar 2008
Posts: 61

PostPosted: Tue Nov 18, 2008 4:43 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
dj-zath
Op


Joined: 15 Nov 2008
Posts: 134

PostPosted: Tue Nov 18, 2008 1:52 pm    Post subject: Reply with quote

this??

Code:


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
Smile Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber