Jump to content

[HELP] Can't get (unordinary) node from xml file.


koragg

Recommended Posts

I found the answer to this

thanks to Xiti. But in order to fix it I need to get information from the map's '.map' file and I'm having a bit of trouble with that.

The file has this inside of it:

<?xml version="1.0" encoding="utf-16"?>
<map mod="deathmatch">
  ...
  <spawnpoint posX="2866.353027" posY="-901.636719" posZ="10.800994" rotation="358" vehicle="411" id="spawnpoint0" />
  ...
</map>

What I need is to somehow get the value of 'mod' and 'mod' itself in a local variable. But the problem is that xmlFindChild() can't be used here. If I needed to get the 'spawnpoint' node and some of it's attributes xmlFindChild() would work, but the 'mod' attribute seems to be a bit different than a regular node (as you see above). So how can I get the 'mod' node and it's value in two different local variables in my script? I need to check if a map has the 'mod' node in it's '.map' file in order to fix my problem with the markers' size.

Edited by koragg
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...