the mod is working. I ran my log thru Google Gemini and it says the error is caused by "a ConnectionHoses.lua error occurring in the base game scripts" amd it has nothing to do with your mod. Gemini says one of the mods i have active is most likely causing the error.
jpcotter123
Recent community posts
I cant upload screenshots so here's the google drive folder link to them: https://drive.google.com/drive/folders/1PkGbt2ecEc5fW-JVDEC9vSuXwcgbc3Wm?usp=dri...
I have all the required mods downloaded. i'll test the railroad mods on a new save. Accordin to Google Gemini:
This is a Lua script crash in Farming Simulator 25 caused by a specific vehicle or implement (likely a mod) with broken "Connection Hose" definitions.
Here is the specific and detailed breakdown of what is happening and how to fix it.
The Diagnosis
The game engine is crashing the ConnectionHoses.lua script. This script handles the visual connecting lines (hydraulic hoses, air lines, electric cables) that appear when you attach a trailer or implement to a tractor.
Technical Breakdown
The error log reveals a cascading failure sequence:
- The Root Cause:
Script error: Divide by zero error ... ConnectionHoses.lua:666 getCenterPointAngleRegulation- What this means: The game is trying to calculate the curve/bend of a hose. To do this, it usually divides by the distance between the start point and the end point.
- Why it fails: The distance is coming back as 0. This usually happens if the "Target Node" (on the implement) and the "Start Node" (on the tractor) are in the exact same physical coordinates, or if the modder defined a hose length of 0 in the XML.
- The Consequence (NaN):
Script error in worldToLocal: Argument 2 is a NaN- What this means: Because the previous calculation divided by zero, the result was
NaN(Not a Number). The game then tried to use this invalid result to determine the hose's position in the 3D world (worldToLocal), causing the second error.
- What this means: Because the previous calculation divided by zero, the result was
- The Crash (Nil):
attempt to perform arithmetic (sub) on number and nil- What this means: The calculation failed so badly that the variable became
nil(empty/non-existent). When the game tried to do basic subtraction (sub) on the next frame, it crashed because you cannot subtract from "nothing."
- What this means: The calculation failed so badly that the variable became
How to Fix It
This error is almost certainly caused by one specific mod (a tractor, trailer, or implement) that you are currently using or is loaded near the player.
1. Identify the Broken Mod
- Context: Did this happen immediately after buying a specific tractor or attaching a specific tool? That item is the culprit.
- Test: If you are unsure, load your save. Walk away from your vehicles. If the console stops spamming the error, walk toward your vehicles one by one. When the error starts spamming again, the vehicle closest to you is the broken one.
2. If You Are a Player (Non-Modder)
- Sell the vehicle: If you can get close enough without the game freezing, sell the vehicle causing the issue.
- Remove the Mod: Uninstall the mod responsible for that vehicle. It requires an update from the author to fix the XML definition.
3. If You Are the Modder (How to Fix the XML)
If you are creating this mod, check your vehicle.xml under the <connectionHoses> section:
- Check Nodes: Ensure the
node(start) andtargetNode(end) are not identical or located at the exact same0,0,0coordinates relative to each other when connected. - Check Length: Look for
lengthattributes. Ensure no hose has a length of0. - Check Diameter: Sometimes a defined
diameterof0can also cause calculation errors in the physics engine.
Next Step:
Do you know which vehicle you bought or used right before these errors started appearing? If you can identify the mod, I can help you locate the specific XML lines to check.
I keep getting these errors:
2026-01-27 21:06:01.528 Error: Running LUA method 'mouseEvent'.
dataS/scripts/gui/InGameMenuMapFrame.lua:1354: attempt to call missing method 'getIsBeingDeleted' of table
2026-01-27 21:13:46.808
Script error: Divide by zero error.
LUA call stack:
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:666 getCenterPointAngleRegulation
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:492 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:46.815
Script error in worldToLocal: Argument 2 is a NaN
LUA call stack:
=[C]:-1 worldToLocal
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:675 getCenterPointAngleRegulation
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:492 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:46.816 Warning (script): 'localToWorld': Argument 1 has wrong type. Expected: Float. Actual: Nil
D:\auto_builder\cache\svn\b1018bf0deae9a98ef19118755739f25\src\base\scripting\lua\LuauScriptSystem.cpp (1127): expectedType == Value::VoidType || expectedType == Value::ClassType2026-01-27 21:13:46.816
Script error: 'localToWorld': Argument 1 has wrong type. Expected: Float. Actual: Nil
LUA call stack:
=[C]:-1 localToWorld
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:518 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:46.816 Error: Running LUA method 'update'.
dataS/scripts/vehicles/specializations/ConnectionHoses.lua:519: attempt to perform arithmetic (sub) on number and nil
2026-01-27 21:13:49.338
Script error: Divide by zero error.
LUA call stack:
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:666 getCenterPointAngleRegulation
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:492 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:49.338
Script error in worldToLocal: Argument 2 is a NaN
LUA call stack:
=[C]:-1 worldToLocal
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:675 getCenterPointAngleRegulation
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:492 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:49.338 Warning (script): 'localToWorld': Argument 1 has wrong type. Expected: Float. Actual: Nil
D:\auto_builder\cache\svn\b1018bf0deae9a98ef19118755739f25\src\base\scripting\lua\LuauScriptSystem.cpp (1127): expectedType == Value::VoidType || expectedType == Value::ClassType2026-01-27 21:13:49.338
Script error: 'localToWorld': Argument 1 has wrong type. Expected: Float. Actual: Nil
LUA call stack:
=[C]:-1 localToWorld
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:518 updateConnectionHose
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:426 updateAttachedConnectionHoses
=dataS/scripts/vehicles/specializations/ConnectionHoses.lua:398 onUpdateInterpolation
=dataS/scripts/specialization/SpecializationUtil.lua:56 raiseEvent
=dataS/scripts/vehicles/Vehicle.lua:2016 update
=dataS/scripts/network/NetworkNode.lua:181 updateActiveObjects
=dataS/scripts/network/Server.lua:64 update
=dataS/scripts/BaseMission.lua:1023 update
=dataS/scripts/FSBaseMission.lua:1913 update
=dataS/scripts/utils/Utils.lua:592
=dataS/scripts/mission00.lua:683 update
=dataS/scripts/main.lua:1240 update
2026-01-27 21:13:49.338 Error: Running LUA method 'update'.
dataS/scripts/vehicles/specializations/ConnectionHoses.lua:519: attempt to perform arithmetic (sub) on number and nil
Is it just me or do the hazard/blinkers sort of blink and flash at the same time when turned on and get somewhat glitchy at different camera angles? (I.e. they flash like a strobe light and blink at the same time). I've noticed it mostly on the Lil Pete; some on the regular; a little bit on the stretched version. I can record and send a video of what i'm talking about if that helps.