File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1192,7 +1192,7 @@ function TRAIN_SYSTEM:CANUpdate()
1192
1192
local Announcer = self .Announcer
1193
1193
local lTbl = Metrostroi .SarmatUPOSetup [self .Train :GetNW2Int (" Announcer" )][Announcer .Line ]
1194
1194
local lTblCount = # lTbl
1195
- local ledTbl = lTbl .LED
1195
+ local ledTbl = lTbl .LED or {}
1196
1196
local currLed , nextLed = 0 ,0
1197
1197
local station = Announcer .Station
1198
1198
if Announcer .AVTDepart then
@@ -1206,10 +1206,10 @@ function TRAIN_SYSTEM:CANUpdate()
1206
1206
end
1207
1207
1208
1208
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 )
1210
1210
end
1211
1211
if Announcer .AVTDepart or not Announcer .OnStation then
1212
- nextLed = ledTbl [station ]
1212
+ nextLed = ledTbl [station ] or 0
1213
1213
currLed = currLed - nextLed
1214
1214
end
1215
1215
You can’t perform that action at this time.
0 commit comments