I'm currently remaking my 3dDrops script but I've run into a weird issue.
I have the following piece of code:
Notice that the script should send a white debug message (telling me the uuids) right when the loop starts, and another message is sent when the "exit loop" statement is executed (loopFound. was same UUID.)
The only problem is that this doesn't work 100% of the time. For example, look at this image:
(Intended behavior, it loops through all entities in the list until it finds the one with correct UUID)
---------
Now the following images:
(What? The list has 5 entities, but it only looped through one of them)
(Sometimes the loop is just skipped!)
--------
Now please, notice that for the "exit loop" statement to execute, the script HAS to send the "loopFound. was same UUID" message. I get told a lot that "you're exiting the loop", but Skript is clearly skipping some list entries or skipping the loop althogether.
I have the following piece of code:
code_language.skript:
# Stuff...
send "&dLooping - %{_entLoops::*}%" to console
loop {_entLoops::*}:
send "&f loop. %loop-value-2% ; %entity uuid of loop-value-2% // %{_tiedUUID}%" to console
if "%entity uuid of loop-value-2%" is "%{_tiedUUID}%":
send "&f loopFound. was same UUID." to console
set {_tiedArmStand} to loop-value-2
exit loop
send "&dLOOPED - %{_entLoops::*}%" to console
# Stuff...
Notice that the script should send a white debug message (telling me the uuids) right when the loop starts, and another message is sent when the "exit loop" statement is executed (loopFound. was same UUID.)
The only problem is that this doesn't work 100% of the time. For example, look at this image:
(Intended behavior, it loops through all entities in the list until it finds the one with correct UUID)
---------
Now the following images:
(What? The list has 5 entities, but it only looped through one of them)
(Sometimes the loop is just skipped!)
--------
Now please, notice that for the "exit loop" statement to execute, the script HAS to send the "loopFound. was same UUID" message. I get told a lot that "you're exiting the loop", but Skript is clearly skipping some list entries or skipping the loop althogether.