From 32bc5704d4894fe749d55a099dcb5039cf7de9a1 Mon Sep 17 00:00:00 2001 From: orwell Date: Tue, 18 Feb 2025 00:18:59 +0100 Subject: The trap triggered, improve output --- advtrains/occupation.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'advtrains/occupation.lua') diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua index 66ad36c..20a986e 100644 --- a/advtrains/occupation.lua +++ b/advtrains/occupation.lua @@ -103,9 +103,7 @@ function o.clear_all_items(train_id, pos) local t = occget(pos) if not t then return end local i = 1 - local _cnt = 0 while t[i] do - _cnt = _cnt + 1; if _cnt > 10000 then error("Loop trap in advtrains.occ,clear_all_items was triggered!") end if t[i]==train_id then table.remove(t, i) table.remove(t, i) -- cgit v1.2.3