Comma in radio control in Input

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Comma in radio control in Input

Post by xavram »

I've messed with encode/decode and strformat and I'm having no luck.

I have an input for the players that shows a list of radio options, based on text strings they enter for their characters (battle cries, for flavor). So for example, you might have...

Taste Steel!
Goram, guide my blade!
Please let this hit...

Now, the problem is, when I cycle through the strings saved by the token, if there's a "," in there, my list of buttons looks like...

Taste Steel!
Goram
guide my blade!
Please let this hit...

Obviously, not what I want! Is there some way to format possible commas so that I can use it this way?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Comma in radio control in Input

Post by aliasmask »

I would use Wiki: replace() on the text and replace , with "&#44". It's similar to the html entities, but without the ending ; because that messess with Wiki: input() as well. You will have to surround the text with <html>text</html> as well.

Code: Select all

[H: battleCries = "Taste Steel!,<html>Goram&#44 guide my blade!</html>,Please let this hit..."]

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Comma in radio control in Input

Post by xavram »

I will give that a shot AM, thanks for the tip!

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: Comma in radio control in Input

Post by xavram »

Had to do some tweaking to get it it to work in the full concept, but this got me over the hump...thanks!

Post Reply

Return to “MapTool”