My automation script is as follows (excluding <>):
?xml version=“1.0” encoding=“UTF-8” standalone=“no”?
automation version=“WMP2”
load file=“test_script.tmd”
section name=“HM Export”
modify>
world res=“1024”
/modify>
build mode=“normal”
output/
/section
/automation
The error is at 9 line at the /modify tag, however I have no idea what I did wrong here. If someone could help me that would be great!
BTW, you can embed code within a code block in discourse using 3 ` characters in a row to start and end the code section.
The following should work:
<modify>
<world res="1024" />
</modify>
Yeah, I did that, and now a different error pops up, saying that my </automation>
tag has a syntax error. I removed the section and here is my updated script:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<automation version="WMP2">
<load file="test_script.tmd">
<modify>
<world res="1024"/>
</modify>
<build mode="normal">
<output/>
</automation>
XML is very strict about closing tags. As opposed to HTML, you must mark any single tags as self-closing. The following should parse correctly:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<automation version="WMP2">
<load file="test_script.tmd" />
<modify>
<world res="1024"/>
</modify>
<build mode="normal" />
<output/>
</automation>
(The load and build commands are not closed in the original script. That is, they don’t include a / at the end of the tag.)
2 Likes
Ah, thank you that works! Thanks for all the help!
system
Closed
April 13, 2021, 9:57pm
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.