COMMUNITY FORUM

Invalid index

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created24.05.2020 23:19


Chris Heyward (FSVelocity) 24.05.2020 23:19
I have been sent a mod and it had a few issues that i have now fixed but i am getting a warning for this any help?

Invalid index for 'vehicle.cylindered.movingTools.movingTool(0).componentJoint(0)'


<cylindered>
<movingTools>
<movingTool node="1|0" playSound="true" >
<controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.15" iconName="TOOL_OPEN_CLOSE" />
<componentJoint index="1" anchorActor="0" />
<rotation rotSpeed="200" rotAcceleration="450" rotMax="0" rotMin="-60" />
<dependentPart node="1|1"/>
</movingTool>
</movingTools>
<movingTools>
<movingTool node="0>1|0">
<dependentPart node="0>1|1"/>
</movingTool>
</movingTools>
<movingParts>
<movingPart node="0>1|1" referencePoint="0>1|0|0" referenceFrame="0>1|0|0" playSound="true">
<translatingPart node="0>1|1|0"/>
</movingPart>
</movingParts>
<sounds>
<hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="0>"/>
</sounds>
</cylindered>

What do i need to do?

Thanks

Bilbo Beutlin (BBeutlin) 25.05.2020 06:37
You have the <movingTools> entry twice. The second <movingTools> is ignored by the XML parser.
In your code above end tag in line 9, start tag line 10.

Chris Heyward (FSVelocity) 25.05.2020 12:08
still the same issue. Would you mind copying and pasting the above with the correct code, just in case i am doing it wrong

Thanks

Da Hoffi (dahoffi) 25.05.2020 12:50
Maybe a stupid question but do you even have a componentJoint defined within <base><components>?

Unknown 26.05.2020 18:37
Look at the error. It says 'invalid index'. AKA some node is indexed in a format that the game engine can't read. Indexing is always done like this:
'Root > child | child | child'. You put all your indexes like this 'child | child | child'
Shouldn't this movingTool node="1|0" be movingTool node="0>1|0" or movingTool node="1>0"? Look in GE at the node index and just copy paste it. Same idea applies to the dependenPart node.

Also the second <movingTools> tag, the one Bilbo pointed at, seems completely reduntant to me. I think you can delete it.


Da Hoffi (dahoffi) 27.05.2020 14:15
For normal index that's true but not for those componentJointIndex or even inputAttacherJointIndex.
They are only "counted" beginning with 1 (in FS17 with 0)

So if you have 4 componentJoints, they would appear like this in movingtools

<componentJoint index="1" anchorActor="0"/>
<componentJoint index="2"/>
<componentJoint index="3"/>
<componentJoint index="4"/>

See example


Note: Log in to post. Create a new account here.