Community Forum

Please take a look LUA

Forum Overview >> Farming Simulator 22

CategoryFarming Simulator 22
Created16.06.2022 18:14


Nina Andersen (WolfieeGirl) 16.06.2022 18:14
Hello. Just a quick question. CAn anyone tell me what this mean and how to fiks it.

I have adden a plane on a spline and added user attributes for it. onCreate =Ship.onCreate. The plane works but it show error and a warning.

2022-06-16 17:59 Warning (script): 'setTranslation': Argument 1 has wrong type. Expected: Float. Actual: Nil
2022-06-16 17:59 2022-06-16 17:59 D:\auto_builder\cache\svn\2019b1e5b6a5c2c179cc4268366e2e1a\src\base\scripting\lua\LuaScriptSystem.cpp (903)2022-06-16 17:59 : 2022-06-16 17:59 expectedType == Value::VoidType || expectedType == Value::ClassType
2022-06-16 17:59 LUA call stack:
dataS/scripts/objects/Ship.lua (54) : setTranslation
dataS/scripts/BaseMission.lua (1263) : update
dataS/scripts/FSBaseMission.lua (1961) : update
dataS/scripts/missions/mission00.lua (577) : update
dataS/scripts/main.lua (1217) : update

And the error is

2022-06-16 17:58 Error: getChildAt index 0 out of range for node 'spline' (#children 0).
2022-06-16 17:58 LUA call stack:
dataS/scripts/objects/Ship.lua (15) : getChildAt
dataS/scripts/objects/Ship.lua (8) : new

I can`t figure it out so please help.
Thank you.

Michael T. (mx11de) 17.06.2022 13:07
Please check the spline. There should be a Problem

Nina Andersen (WolfieeGirl) 21.06.2022 05:05
I found the error, fixed it :) thank you for the tip.


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