table[].keys.sorted does not recognize numeric

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Nickopoll
Posts: 7
Joined: Sat, 30. Jan 16, 16:24

table[].keys.sorted does not recognize numeric

Post by Nickopoll » Wed, 14. Apr 21, 08:41

I have a table[]

Code: Select all

<set_value name="$allProbes" exact="table[]"/>
<do_for_each name="$probe" in="$resourceprobes">
	<set_value name="$allProbes.{$probe}" exact="$probe.currentyield.{$evalware}.count"/>	
</do_for_each>
When I want to sort all table by values

Code: Select all

<set_value name="$sortedProbeYields" exact="$allProbes.keys.sorted"/>
I get an error
Attribute exact=[component.{0x2e50dL},component.{0x2e514L},component.{0x7c576L},component.{0x2d481L},component.{0x2d833L},component.{0x2e504L},component.{0x1054dL},component.{0x1055cL},component.{0x59fccL},component.{0x59fcfL},component.{0x5ccd2L},component.{0x59fcdL},component.{0x4365dL},component.{0x5ddcdL},component.{0x65e98L},component.{0x65431L},...] is not numeric
But $probe.currentyield.{$evalware}.count IS numeric. I checked with typeof.

Post Reply

Return to “X4: Foundations - Scripts and Modding”