-
October 6th, 2019, 13:03 #1
Return order of getChildren as per XML order
Afternoon Folks,
I've got a node which stores the results of the dice rolls. Works lovely:
<savedroll>
<id-00004>
<result type="number">6</result>
</id-00004>
<id-00005>
<result type="number">10</result>
</id-00005>
<id-00006>
<result type="number">3</result>
</id-00006>
</savedroll>
Runtime Notice: s'v' | databasenode = { charsheet.id-00005.savedroll.id-00006 }
Runtime Notice: s'v' | databasenode = { charsheet.id-00005.savedroll.id-00005 }
Runtime Notice: s'v' | databasenode = { charsheet.id-00005.savedroll.id-00004 }
Any thoughts?
Cheers
MBMRuleset and much more content built for FGU.
Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!
-
October 6th, 2019, 21:50 #2
That is correct. DB.getChildren does not return in order where they are presented in XML, instead they are identified by their node name (string type) in table and when you use pairs to iterate them through they seem to come out in "random" order. In SavageWorlds I had need to get them in asc order so I have implemented getChildrenSorted function t achieve that.
"Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness
Post your SavageWorlds ruleset feature requests and issue reports here!
-
October 6th, 2019, 22:42 #3Ruleset and much more content built for FGU.
Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks