Dialog Displaying in Chat

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
Zokka
Cave Troll
Posts: 37
Joined: Mon Dec 08, 2008 8:08 am

Dialog Displaying in Chat

Post by Zokka »

Hi

I have been adding macros to my player tokens (not using any framework). But when I hit a certain amount of macros, the next one displays in the chat window instead of the dialog box. I remember a while ago there being an issue with the stack size. I have upped mine to 10mg and still no good.

I would really appreciate some help with this issue.

Thanks

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Dialog Displaying in Chat

Post by aliasmask »

Stack shouldn't be that high. I would say 4 at max. The best way to avoid stack issues is to put your output in to a variable and then post the output. Also, avoid html comments. If you post your code I can suggest changes.

But your problem may not be stack. All code is posted to the chat and if you don't have autoexecute checked on the macro you clicked then the code will just stay there until you hit enter. I don't know if that is the problem but you didn't mention anything about an error or bad output.

User avatar
Zokka
Cave Troll
Posts: 37
Joined: Mon Dec 08, 2008 8:08 am

Re: Dialog Displaying in Chat

Post by Zokka »

Hi ALiasmask

Auto Execute is checked. And as I mentioned this is a simple dialog box that with different text works fine on previous macros. In fact if I begin to delete the code word by word, it will get to a point where is does display in a dialog box. This is what made me think of stack. Anyway here is the code. Very simple.

[dialog ("Conditions"):
{
<b>Blinded</b>:<br>
• A blinded creature can’t see and automatically fails
any ability c heck that requires sight.<br>
• Attack rolls against the creature have advantage, and
the creature’s attack rolls have disadvantage.
<br><br>
<b> Charmed</b><br>
• A charmed creature can't attack the charmer or target
the charmer with harmful abilities or m agical effects.<br>
• The charmer has advantage on any ability check to
interact socially with the creature<br><br>
<


}]
[abort (0)]


Thanks

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Dialog Displaying in Chat

Post by aliasmask »

Code: Select all

[H: output = "
   <b>Blinded</b>:
   <ul>
      <li>A blinded creature can't see and automatically fails any ability check that requires sight.</li>
      <li>Attack rolls against the creature have advantage, and the creature's attack rolls have disadvantage.</li>
   </ul><br>

   <b>Charmed</b>
   <ul>
      <li>A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects.</li>
      <li>The charmer has advantage on any ability check to interact socially with the creature</li>
   </ul>
"]
[dialog("Conditions"): {
   [R: output]
}] 
You had an extra < which may have been causing problems. I recommend not using unicode characters and use html instead. Also, the single quote was a unicode character so I would replace all those with normal single quotes. If your text has a quote, change it to the html entity " instead.

User avatar
Zokka
Cave Troll
Posts: 37
Joined: Mon Dec 08, 2008 8:08 am

Re: Dialog Displaying in Chat

Post by Zokka »

Unfortunately that code doesn't work either. All I get is the last 2 lines of the code displayed in the chat window.

User avatar
Zokka
Cave Troll
Posts: 37
Joined: Mon Dec 08, 2008 8:08 am

Re: Dialog Displaying in Chat

Post by Zokka »

Correction to the last post. I missed something and now I have it working. Thanks very much for your help.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Dialog Displaying in Chat

Post by aliasmask »

Zokka wrote:Unfortunately that code doesn't work either. All I get is the last 2 lines of the code displayed in the chat window.
I've tested this and there is no chat output.

edit: okay, I'll post my token anyway.
Attachments
test token.rptok
(161.43 KiB) Downloaded 25 times

Post Reply

Return to “Macros”