Leslie Geschrieben Freitag um 12:54 Uhr Geschrieben Freitag um 12:54 Uhr Nested iterations can not work. In first sight this is a normal routine: But LUA: local t = layout:getVehiclesOn(signal) for i, Iter in ipairs(t) do if Iter.variables["Park"] == 1 then Iter.variables["Park"] = 2 -- Iter2 local t2 = layout:getVehiclesOn($("Stop31")) for i2, Iter2 in ipairs(t2) do if Iter2.variables["Park"] > 1 then Iter.variables["Park"] = 1 end end These (2) corrections are hand-made and still not work. Without correction all variables are equal, routine does not works at all. I know this nested commands are not effective so I must re-think all. But this requires a loud warning at the program for anybody to not use nest at iterations.
Goetz Geschrieben Freitag um 13:14 Uhr Geschrieben Freitag um 13:14 Uhr vor 19 Minuten schrieb Leslie: Nested iterations can not work I see only one iteration in your screenshot. With nested conditions ...
Leslie Geschrieben Freitag um 13:28 Uhr Autor Geschrieben Freitag um 13:28 Uhr Nested = inside of the iteration there is a second iteration. This causes dysfunction at all time.
Goetz Geschrieben Freitag um 13:48 Uhr Geschrieben Freitag um 13:48 Uhr I know what a nested iteration is, Leslie But your screenshot didn't show one. Here's a nested iteration for you and it works as intended: nested iteration.mbp Kind regards Goetz
Phrontistes Geschrieben Freitag um 15:25 Uhr Geschrieben Freitag um 15:25 Uhr (bearbeitet) vor 2 Stunden schrieb Goetz: I see only one iteration in your screenshot. vor 1 Stunde schrieb Goetz: But your screenshot didn't show one. Bearbeitet Freitag um 15:35 Uhr von Phrontistes typo
Goetz Geschrieben Freitag um 16:18 Uhr Geschrieben Freitag um 16:18 Uhr I missed that. Thank you, @Phrontistes
Neo Geschrieben Freitag um 18:34 Uhr Geschrieben Freitag um 18:34 Uhr What is the actual problem with nested iterations? Please provide a sample layout which demonstrates any errors. Kind regards, Neo
Leslie Geschrieben Freitag um 21:57 Uhr Autor Geschrieben Freitag um 21:57 Uhr My program caused bad result. I thought that same variables (i, t) cause this. Later reorganized everything and now I have no nested iterations.
Empfohlene Beiträge
Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren
Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können
Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen.
Neues Benutzerkonto erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden