Skip to content

Commit 84226c4

Browse files
committed
81-722.
Дополнительные проверки в БМЦИК для таблицы БНТ
1 parent 5a58301 commit 84226c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/metrostroi/systems/sys_81_722_sarmat_upo.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ function TRAIN_SYSTEM:CANUpdate()
11921192
local Announcer = self.Announcer
11931193
local lTbl = Metrostroi.SarmatUPOSetup[self.Train:GetNW2Int("Announcer")][Announcer.Line]
11941194
local lTblCount = #lTbl
1195-
local ledTbl = lTbl.LED
1195+
local ledTbl = lTbl.LED or {}
11961196
local currLed, nextLed = 0,0
11971197
local station = Announcer.Station
11981198
if Announcer.AVTDepart then
@@ -1206,10 +1206,10 @@ function TRAIN_SYSTEM:CANUpdate()
12061206
end
12071207

12081208
for i=(Announcer.Path and #ledTbl or 1),station,(Announcer.Path and -1 or 1) do
1209-
currLed = currLed + ledTbl[i]
1209+
currLed = currLed + (ledTbl[i] or 0)
12101210
end
12111211
if Announcer.AVTDepart or not Announcer.OnStation then
1212-
nextLed = ledTbl[station]
1212+
nextLed = ledTbl[station] or 0
12131213
currLed = currLed - nextLed
12141214
end
12151215

0 commit comments

Comments
 (0)