| View previous topic :: View next topic |
| Author |
Message |
Jagg Halfop
Joined: 24 Jan 2004 Posts: 53
|
Posted: Mon Sep 03, 2007 11:21 am Post subject: strange putserv question |
|
|
Hi,
I have five variables I want to output in one line (each variable consists of one number). But when I do
| Code: | | 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:
| Quote: | | <MyEggdrop>O: 1461.50 |
That's all
When I do
| Code: | 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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Sep 03, 2007 12:20 pm Post subject: |
|
|
Have you double-checked that there is no newlines at the end of any of those variables? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Jagg Halfop
Joined: 24 Jan 2004 Posts: 53
|
Posted: Mon Sep 03, 2007 12:47 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Sep 03, 2007 12:52 pm Post subject: |
|
|
Remove the \n from the sourcefile?
You could also use something like this if you really need the newlines within the variable contents:
| Code: | | puthelp "PRIVMSG $chan :O: [string trim $today_high "\n"] L: [string trim $today_low "\n"]....." |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|