RPTools.net

Discussion and Support

Skip to content

It is currently Fri Nov 17, 2017 12:33 pm 




Forum rules


Posting now open to all registered forum users.



Reply to topic  [ 7 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6307
Location: Middle of Nowhere, NM
 Post subject: Spurious output from macros with comments - known issue?
PostPosted: Wed Nov 08, 2017 7:08 pm 
So the following macro code produces the correct output on the GM's and macro-clicker's chat but also produces blank output lines on all the other clients.

Code:
<!-- foo -->
[s,g,r:1d100]

This also happens with just the 's' roll option or just the 'g' roll option.

Take out the comment and it works as expected.

Is this a known issue? If so, is there a workaround?

MT versions 1.4.0.5 and 1.4.1.7.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3773
Location: MD
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Wed Nov 08, 2017 9:32 pm 
Phergus wrote:
So the following macro code produces the correct output on the GM's and macro-clicker's chat but also produces blank output lines on all the other clients.

Code:
<!-- foo -->
[s,g,r:1d100]

This also happens with just the 's' roll option or just the 'g' roll option.

Take out the comment and it works as expected.

Is this a known issue? If so, is there a workaround?

MT versions 1.4.0.5 and 1.4.1.7.


You need to hide the comment.

Code:
[h: "<!-- foo -->"]


http://lmwcs.com/rptools/wiki/Introduct ... o#Comments

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Wed Nov 08, 2017 9:58 pm 
Better yet, use UDFs, hide output and use broadcast for output.

My starter token has all the basics for creating UDFs for you: viewtopic.php?f=20&t=27318&p=267681&hilit=starter#p267681

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6307
Location: Middle of Nowhere, NM
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Thu Nov 09, 2017 9:19 am 
Full Bleed wrote:
You need to hide the comment.

Code:
[h: "<!-- foo -->"]

http://lmwcs.com/rptools/wiki/Introduct ... o#Comments


Thanks FB. :lol: Hide the hidden output by hiding it. I should have expected that. :lol:

Too bad the documentation on the wiki doesn't just say that HTML comments create spurious output so don't use them.

Quote:
In contrast, in MapTool's macro language, anything between the comment tags is hidden from chat, but if you embed macro commands in there, they will be executed.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6307
Location: Middle of Nowhere, NM
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Thu Nov 09, 2017 9:30 am 
aliasmask wrote:
Better yet, use UDFs, hide output and use broadcast for output.

Not sure that addresses the issue that even if I hide all output in a macro a single HTML comment will produce a line of empty output to all clients. My goal is to have comments in my macro code and apparently the documentation is flat wrong.

aliasmask wrote:
My starter token has all the basics for creating UDFs for you: viewtopic.php?f=20&t=27318&p=267681&hilit=starter#p267681


Thanks. I'll look over your stuff.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7947
Location: Bay Area
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Thu Nov 09, 2017 12:17 pm 
Html comments still produces output. If you go to the chat log you would see the blank lines are actually your html comments. But since they are not shown in text, you don't see anything.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6307
Location: Middle of Nowhere, NM
 Post subject: Re: Spurious output from macros with comments - known issue?
PostPosted: Thu Nov 09, 2017 6:45 pm 
Well that explains why the chat log files are so big.

For every line of of actual chat output there are 10 or so lines of HTML comment plus all the HTML formatting code.

Your recommendation about UDFs was because they can produce no output at all if the ignoreOutput flag is set to true?

You'll have to forgive my ignorance about the macro functions as even though I have been using MapTool for 12 years I rarely used macros until a couple years ago. Until four weeks ago I had never saved a chat log let alone looked at one.

Thanks AM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 7 posts ] 

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 post attachments in this forum

Search for:

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 3 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman