Jump to content
Zum Start hinzufügen

Weitere Informationen

3D-Modellbahn Studio

Eine Vollbild-App auf Ihrem Startbildschirm mit Push-Benachrichtigungen und mehr.

So installieren Sie diese App auf iOS und iPadOS
  1. Tippen Sie auf das Teilen-Symbol in Safari
  2. Scrollen Sie durch das Menü und tippen Sie auf Zum Startbildschirm hinzufügen.
  3. Tippen Sie oben rechts auf Hinzufügen.
So installieren Sie diese App auf Android
  1. Tippen Sie auf das 3-Punkte-Menü (⋮) in der oberen rechten Ecke des Browsers.
  2. Tippen Sie auf Zum Startbildschirm hinzufügen oder App installieren.
  3. Bestätigen Sie durch Tippen auf Installieren.

Empfohlene Beiträge

Geschrieben

Nested iterations can not work. In first sight this is a normal routine:

iter.JPG.d5ee8fb5e61130d36359fe8aacf2a8e3.JPG

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.

Geschrieben
vor 19 Minuten schrieb Leslie:

Nested iterations can not work

I see only one iteration in your screenshot.
With nested conditions ...

Geschrieben
  • Autor

Nested = inside of the iteration there is a second iteration.

This causes dysfunction at all time.

Geschrieben

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

Geschrieben
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.

2025-05-0917_22_34-Nestediterations-InternationalProblemsandsolutions-3D-ModellbahnStudi.thumb.jpg.1eee3e333cf5b7ce55d97e18eb4e1ef9.jpg

Bearbeitet von Phrontistes
typo

Geschrieben

I missed that. Thank you, @Phrontistes

Geschrieben

What is the actual problem with nested iterations? Please provide a sample layout which demonstrates any errors.

Kind regards,

Neo

Geschrieben
  • Autor

My program caused bad result. I thought that same variables (i, t) cause this.

Later reorganized everything and now I have no nested iterations.

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Push-Benachrichtigungen konfigurieren

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.