Copy Pasting issues

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Copy Pasting issues

Post by PinkRose »

So, I would like to be able to take this macro, copy it to a spreadsheet so I can edit it easily, and copy it back. But when I copy it back, even without changing anything, it doesn't work. I'm sure I'm picking up something code wise by using a spreadsheet, but I can't figure out what it is.
Any ideas?

Code: Select all

[frame("Token_Sheet"): {	
<html>	
<head>	
[r: "<style>	
.sblock { background: #FDF1DC; }	
table.sblock {	
width: 100%;	
border: 0px;	
border-collapse: collapse;	
}	
th, td {	
width: 50px;	
text-align: center;	
}	
h1 { font-family: 'Libre Baskerville', 'Lora', 'Calisto MT',	
Bookman Old Style', Bookman, 'Goudy Old Style',	
Garamond, 'Hoefler Text', 'Bitstream Charter',	
Georgia, serif;	
color: #7A200D;	
font-weight: 700;	
margin: 0px;	
font-size: 23px;	
letter-spacing: 1px;	
font-variant: small-caps;	
}	
h2 {	
font-weight: normal;	
font-style: italic;	
font-size: 12px;	
margin: 0;	
}	
	
.propline {	
line-height: 1.4;	
display: block;	
text-indent: -1em;	
padding-left: 1em;	
}	
	
h4 {	
color: #7A200D;	
margin: 0;	
display: inline;	
font-weight: bold;	
}	
p {	
text-indent: 1em;	
margin: 0;	
}	
	.rule { height: 2px; background: #922610; position: relative; }
</style>"]	
<title>Reef Shark Details</title>	
</head>	
<body>	
<div class="sblock">	
<creature-heading>	
<h1>{getProperty("mname")}</h1>	
<h2>{getProperty("CreatureType")}, {getProperty("alignment")}</h2>	
</creature-heading>	
	<div class="rule"></div>
<div class="property-line">	
<h4>Armor Class</h4>	
<p>{getProperty("ac")}</p>	
</div>	
<div class="propline">	
<h4>Hit Point</h4>	
<p>{getProperty("hp")} {getProperty("hitdice")}</p>	
</div>	
<div class="propline">	
<h4>Speed</h4>	
<p>{getProperty("speed")}</p>	
</div>	
	<div class="rule"></div>
<table class="sblock">	
<tr> <th>STR</th><th>DEX</th><th>CON</th><th>INT</th><th>WIS</th><th>CHA</th> </tr>	
<tr>	
<td id="str">{getProperty("Strength")}</td>	
<td id="dex">{getProperty("Dexterity")}</td>	
<td id="con">{getProperty("Constitution")}</td>	
<td id="int">{getProperty("Intelligence")}</td>	
<td id="wis">{getProperty("Wisdom")}</td>	
<td id="cha">{getProperty("Charisma")}</td>	
</tr>	
</table>	
	<div class="rule"></div>
	<p><b>Saves</b> {getProperty("Saves")}</p>
	<p><b>Skills</b> {getProperty("Skills")}</p>
	<p><b>Senses</b> {getProperty("Senses")}</p>
	<p><b>Languages</b> {getProperty("Languages")}</p>
	<p><b>Immunities</b> {getProperty("Immunities")} </p>
	<p><b>Resistances</b> {getProperty("Resistances")}</p>
	<p><b>Vulnerabilities</b> {getProperty("Vulnerabilities")}</p>
	<div class="rule"></div>
	
	<p><b>Pack Tactics</b> The shark has advantage on an attack roll against a creature if at least one of the shark&#39;s allies is within 5 ft. of the creature and the ally isn&#39;t incapacitated.</p>
	
	<p><b>Water Breathing</b> The shark can breathe only underwater.</p>
	
	<p></p>
<h3>ACTIONS</h3>	
	<div class="rule"></div>
	
	<p><b>Bite</b> Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 6 (1d8 + 2) piercing damage.</p>
	
</div>	
</body>	
</html>	
}]	

Code: Select all

ava.lang.RuntimeException: Unclosed '
	at java.desktop/javax.swing.text.html.CSSParser.readTill(CSSParser.java:674)
	at java.desktop/javax.swing.text.html.CSSParser.nextToken(CSSParser.java:478)
	at java.desktop/javax.swing.text.html.CSSParser.parseIdentifiers(CSSParser.java:374)
	at java.desktop/javax.swing.text.html.CSSParser.parseDeclaration(CSSParser.java:357)
	at java.desktop/javax.swing.text.html.CSSParser.parseDeclarationBlock(CSSParser.java:325)
	at java.desktop/javax.swing.text.html.CSSParser.parseRuleSet(CSSParser.java:272)
	at java.desktop/javax.swing.text.html.CSSParser.getNextStatement(CSSParser.java:178)
	at java.desktop/javax.swing.text.html.CSSParser.parse(CSSParser.java:153)
	at java.desktop/javax.swing.text.html.StyleSheet$CssParser.parse(StyleSheet.java:3258)
	at java.desktop/javax.swing.text.html.StyleSheet.addRule(StyleSheet.java:314)
	at java.desktop/javax.swing.text.html.HTMLDocument$HTMLReader.addCSSRules(HTMLDocument.java:4071)
	at java.desktop/javax.swing.text.html.HTMLDocument$HTMLReader$HeadAction.end(HTMLDocument.java:3182)
	at java.desktop/javax.swing.text.html.HTMLDocument$HTMLReader.handleEndTag(HTMLDocument.java:2897)
	at java.desktop/javax.swing.text.html.parser.DocumentParser.handleEndTag(DocumentParser.java:253)
	at java.desktop/javax.swing.text.html.parser.Parser.parse(Parser.java:2394)
	at java.desktop/javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:135)
	at java.desktop/javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:113)
	at java.desktop/javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:263)
	at java.desktop/javax.swing.JEditorPane.setText(JEditorPane.java:1428)
	at net.rptools.maptool.client.ui.htmlframe.HTMLPane.setText(HTMLPane.java:201)
	at net.rptools.maptool.client.ui.htmlframe.HTMLPanel$2.run(HTMLPanel.java:93)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:43)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
I am a special snowflake!

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

Re: Copy Pasting issues

Post by aliasmask »

Check your single quotes: Bookman Old Style

Code: Select all

h1 { font-family: 'Libre Baskerville', 'Lora', 'Calisto MT',	
Bookman Old Style', Bookman, 'Goudy Old Style',	
Garamond, 'Hoefler Text', 'Bitstream Charter',	
Georgia, serif;	

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: Copy Pasting issues

Post by PinkRose »

That was it.
The quote was there but because it started a cell row, it didn't show up and wouldn't copy.
Thank you.
I am a special snowflake!

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Copy Pasting issues

Post by Phergus »

Why would you use a spreadsheet to edit the macro? :shock:

Use Notepad++ or any of a thousand text editors. Most will flag when you have unmatched quotes, parens, braces, brackets, etc.

Also office software like Excel or Word tend to convert characters like single and double quotes into the print style open and close quotes.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: Copy Pasting issues

Post by PinkRose »

Because with a spreadsheet I can just change the text in column A and leave all the code alone in column B.
I know nothing about coding, just really good and copy and pasting. Usually.
I am a special snowflake!

Post Reply

Return to “Requests for HELLLLP!”