How do I fix this XML?

Get help using Construct 2

Post » Tue Sep 13, 2016 4:59 pm

Image

This is the code that runs it, and it outputs nothing.

Code: Select all
   
<?xml version='1.0' ?>
<LevelData>
   <level id='-2' layout='1-1'>Test Level One</level>
   <level id='1' layout='1-2'>Test Level Two: Electric Boogaloo</level>
   <level id='3' layout='1-3'>Test Level Three: The Direct To Video</level>
   <level id='7' layout='1-4'>Test Level Four: The Prequel</level>
   <level id='10' layout='1-5'>Test Level Five: The Spin-Off</level>
   <level id='12' layout='1-5'>Test Level Six: The Christmas Special</level>
   <level id='16' layout='1-6'>Test Level Seven: The Television Series</level>
   <level id='21' layout='1-6'>Test Level Eight: The Reboot</level>
</LevelData>


This is the XML itself.

No matter what "Node" I set the player to (on xml sheet or not) it outputs nothing.

The text is supposed to be text, and the layout is supposed to just point to a layout. How am I doing this wrong?
B
21
S
6
Posts: 21
Reputation: 1,296

Post » Tue Sep 13, 2016 5:22 pm

Should work. Are you sure CurrentNode is correct/valid? Just try hardcoding 3 for now to see if it works.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Tue Sep 13, 2016 5:39 pm

I tried that, it didn't do anything, strange...
B
21
S
6
Posts: 21
Reputation: 1,296

Post » Tue Sep 13, 2016 5:47 pm

Are you sure AJAX.LastData contains actual data ? (i.e. is it really loading your file ?)
B
67
S
28
G
24
Posts: 970
Reputation: 18,675

Post » Tue Sep 13, 2016 7:06 pm

Debugger says AJAX has it in it's Last data.
B
21
S
6
Posts: 21
Reputation: 1,296

Post » Tue Sep 13, 2016 7:25 pm

ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, newt and 14 guests