Bug Issue: Nested loops index bug


Pages: 1

Royagers

  • Subscriber - Stencyl Studio
  • *
November 06, 2023, 03:11:31 am
If you use nested loops, the last index is always used. Herewith, in design mode, different "current loop count" blocks are dragged.
Code: [Select]
/* ====================== Custom Event ======================= */
public function _customEvent_TEST():Void
{
for(index0 in 0...2)
{
for(index1 in 0...3)
{
trace((("index0:") + ("" + index1)));
trace((("index1:") + ("" + index1)));
}
}
}
This may be by design, but it would be better to use different indexes.


New attachment added by Royagers - November 06, 2023, 03:11:55 am


Justin

  • Master Stencyler
  • *
November 06, 2023, 06:36:50 am
Yes, it's currently not possible to distinguish between two of these, so until this is handled in some way, you'll need to assign the outer loop index to another attribute.


Royagers

  • Subscriber - Stencyl Studio
  • *
November 08, 2023, 11:37:26 pm
Ok.


Pages: 1

Details

  • Reported
    November 06, 2023, 03:11:31 am
  • Updated
    January 02, 2024, 09:03:14 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine

Tags


Attachments


* nested loops.png (18.17 kB, 326x189 - viewed 1612 times.)