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 for those learning Tcl or writing their own scripts.
-
Jagg
- Halfop
- Posts: 53
- Joined: Sat Jan 24, 2004 11:32 am
Post
by Jagg »
Hi,
I have five variables I want to output in one line (each variable consists of one number). But when I do
Code: Select all
putserv "PRIVMSG $chan :O: $today_open H: $today_high L: $today_low C: $today_close Change: $today_change"
I get this output in the irc-chan:
<MyEggdrop>O: 1461.50
That's all
When I do
Code: Select all
putserv "PRIVMSG $chan :Open: $today_open"
putserv "PRIVMSG $chan :High: $today_high"
putserv "PRIVMSG $chan :Low: $today_low"
putserv "PRIVMSG $chan :Close: $today_close"
putserv "PRIVMSG $chan :Change: $today_change"
I get each variable/number correct in the irc chan (but every number in a new line and I want it in one line).
Thanks
-
nml375
- Revered One
- Posts: 2860
- Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 »
Have you double-checked that there is no newlines at the end of any of those variables?
NML_375
-
Jagg
- Halfop
- Posts: 53
- Joined: Sat Jan 24, 2004 11:32 am
Post
by Jagg »
ahh, there are \n in the source file so that could be the reason. How can I get rid of these \n?
(info: really backslash and n in the code, not meant as physical newlines)
-
nml375
- Revered One
- Posts: 2860
- Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 »
Remove the \n from the sourcefile?
You could also use something like this if you really need the newlines within the variable contents:
Code: Select all
puthelp "PRIVMSG $chan :O: [string trim $today_high "\n"] L: [string trim $today_low "\n"]....."
NML_375