Community Forum

LUA Error Unknown

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created17.03.2018 11:48

Tony Queen (tqueen113) 17.03.2018 11:48
I am getting a LUA error I do not understand and was wondering if anyone here could help.

Warning (LUA): 'setXMLString': Argument 2 has wrong type. Expected: String. Actual: Number
..\..\..\src\base\scripting\lua\LuaScriptSystem.cpp (600): expectedType == Value::VoidType || expectedType == Value::FloatType || expectedType == Value::IntType
LUA call stack:
dataS/scripts/FSCareerMissionInfo.lua (507) : setXMLString
dataS/scripts/gui/CareerScreen.lua (784) : saveToXML
=[C] (4294967295)
dataS/scripts/gui/CareerScreen.lua (909) : saveWriteSavegameStart
dataS/scripts/utils/Utils.lua (1858) : oldFunc
dataS/scripts/utils/Utils.lua (1858) : oldFunc
dataS/scripts/utils/Utils.lua (1858) : oldFunc
=C:/Users/Rockhound/Documents/My Games/FarmingSimulator2017/mods/FS17_GameExtension/GameExtension.lua (337) : superFunc
dataS/scripts/missions/mission00.lua (404) : saveSavegame
dataS/scripts/gui/InGameMenu.lua (1015) : saveSavegame
dataS/scripts/gui/elements/Gui.lua (306) : update
dataS/scripts/main.lua (1918) : update

Bilbo Beutlin (BBeutlin) 18.03.2018 04:42
sorry - I'm not clairvoyant ;)
The error must be within your your custom script. Quite sure expected parameters are not compatible to an invoked function.
Since the errors occur in oldFunc, saveSavegame, superFunc .. i'd guess you did something wrong in an overwritten or appended function.

Tony Queen (tqueen113) 18.03.2018 05:38
All I did was add cotton_windrow with the additionalMapTypse mod to go with my cotton, thanks for your help but I am no good with LUA scripting so not sure where or what to do.

Bilbo Beutlin (BBeutlin) 20.03.2018 00:48
Nice - you could have mentioned earlier, that you don't use an own script, but the "additionalMapTypes.lua".

Older mod maps have this lua with version upto, which generates an error with user defined windrow, if the baleTypeName is missing.
--- line 294 ---
baleTypeName = Utils.getNoNil(getXMLString(xmlFile, fruitTypeKey..'#baleTypeName'), oat_windrow),
oat_windrow isn't quoted, so it is interpreted as variable and this wasn't defined earlier - it is nil.

Your error(s) should disappear, if you define the baleTypeName explicitely.

Otherwise (recommanded) you could exchange the lua with the updated vs, which is adapted to patch 1.4.4 and (hopefully) bugfixed.

If not, then edit the lua for yourself. Search this faulty line and set oat_windrow in quotes.

Tony Queen (tqueen113) 25.03.2018 01:20
Thank you so much!
I updated the lua file and made a few changes in the modDesc and it is working perfectly now!

Thanks again for your help!


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