From 92b053dd91a5c2d8c2413b3c93af7c1a127affd4 Mon Sep 17 00:00:00 2001 From: masterdraco Date: Sat, 17 Oct 2026 11:57:53 +0200 Subject: [PATCH] chore: stuck-diag fillLevel type-guard (review) --- FS25_ADSmartPickup/adStuckDiag.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FS25_ADSmartPickup/adStuckDiag.lua b/FS25_ADSmartPickup/adStuckDiag.lua index 6770d78..69d805e 100644 --- a/FS25_ADSmartPickup/adStuckDiag.lua +++ b/FS25_ADSmartPickup/adStuckDiag.lua @@ -74,7 +74,7 @@ function ADStuckDiag.describe(vehicle) tostring(tm.isLoading), tostring(tm.isUnloading), tostring(tm.isActiveAtTrigger ~= nil and tm:isActiveAtTrigger()), tostring(tm.isUnloadingToBunkerSilo ~= nil and tm:isUnloadingToBunkerSilo()), - tostring(task ~= nil and task.waitForALUnload), tostring(tm.fillLevel ~= nil and math.floor(tm.fillLevel) or "?"))) + tostring(task ~= nil and task.waitForALUnload), tostring(type(tm.fillLevel) == "number" and math.floor(tm.fillLevel) or "?"))) end local wait = ADUnloadWait ~= nil and ADUnloadWait.getWaitFor ~= nil and ADUnloadWait.getWaitFor(vehicle) or nil local hold = ADOutbound ~= nil and ADOutbound.getHoldFor ~= nil and ADOutbound.getHoldFor(vehicle) or nil