I believe there's already an issue for this, but I couldn't find it with a quick search, and given it's been a while since it was discussed and that this should spark a new conversation (since I've found the root issue), I'm putting it in its own issue.
The Problem
Recent releases (at least since dev31, and now including dev32) have had some issues when referencing a loop-entity expression within a loop, often leading to Skript throwing an error reading as There's no loop that matches 'loop-entity' even when the code it's referencing is, indeed, inside of a loop which is (or at least should be) iterating over entities. This error is occurring at parse time on code that worked in previous versions.
Environment
I'm testing using my normal setup of plugins sans all Skript addons on Spigot 1.12.2 using the latest Skript release (the dev32 build released today). A screenshot of my console with a plugin list, Skript version, and Spigot version:

As you can see, I'm running the very latest version of Spigot (built a fresh JAR today).
Recreation
As it turns out, this bug occurs in a very specific but repeatable circumstance: when entities are being looped around a location when the syntax %object%'s location is used, where %object% can either be a location stored in a variable or any object which Skript will try to automatically convert into a location (such as a block or an entity). Omitting the 's location fixes the issue.
An example test script:
on right click:
set {_test} to player's location
loop entities in radius 5 of {_test}'s location:
add loop-entity to {_list::*}
loop entities in radius 5 of {_test}:
add loop-entity to {_list2::*}
loop entities in radius 5 of player's location:
add loop-entity to {_list3::*}
loop entities in radius 5 of player:
add loop-entity to {_list4::*}
loop entities in radius 5 of (block at player)'s location:
add loop-entity to {_list5::*}
loop entities in radius 5 of block at player:
add loop-entity to {_list6::*}
All six of these should work and this script should reload without errors. However, the ones using the 's location syntax all throw an error with the loop-entity expression on reload, as shown here:

The error can be "bypassed" by using loop-value as opposed to loop-entity, and this reveals that the loop is erroneously returning the location of the object in question as opposed to the object itself. For example, if you run this script and right click...
on right click:
loop entities in radius 5 of player's location:
add loop-value to {_list::*}
send "%{_list::*}%"
... you'll receive back your own location, and the locations of entities within 5 meters of you, as opposed to the actual objects representing you and those entities.
As you may guess, this error also occurs when getting a list of entities inline (since really that's all the loop is doing too - creating the list then iterating over it). Running send "%entities in radius 5 of player's location%" will send back the locations, not the entities.
So that's really the root of the problem: referencing entities around %object%'s location returns the location of captured entities, not the entities themselves. So, as you may also guess, the only valid expression in this loop (aside from loop-value) is loop-location, which parses correctly:
on right click:
set {_test} to player's location
loop entities in radius 5 of {_test}'s location:
add loop-location to {_list::*}
send "%{_list::*}%"
And, for the sake of clarity and full testing, I'll note that this bug does not affect blocks, just entities.
Hope that helps you resolve this issue -- for now, everyone experiencing it can fix it by updating their list syntaxes, but it should definitely still be fixed for the sake of backwards compatibility and common sense.
I believe there's already an issue for this, but I couldn't find it with a quick search, and given it's been a while since it was discussed and that this should spark a new conversation (since I've found the root issue), I'm putting it in its own issue.
The Problem
Recent releases (at least since dev31, and now including dev32) have had some issues when referencing a
loop-entityexpression within a loop, often leading to Skript throwing an error reading asThere's no loop that matches 'loop-entity'even when the code it's referencing is, indeed, inside of a loop which is (or at least should be) iterating over entities. This error is occurring at parse time on code that worked in previous versions.Environment
I'm testing using my normal setup of plugins sans all Skript addons on Spigot 1.12.2 using the latest Skript release (the dev32 build released today). A screenshot of my console with a plugin list, Skript version, and Spigot version:
As you can see, I'm running the very latest version of Spigot (built a fresh JAR today).
Recreation
As it turns out, this bug occurs in a very specific but repeatable circumstance: when entities are being looped around a location when the syntax
%object%'s locationis used, where%object%can either be a location stored in a variable or any object which Skript will try to automatically convert into a location (such as a block or an entity). Omitting the's locationfixes the issue.An example test script:
All six of these should work and this script should reload without errors. However, the ones using the
's locationsyntax all throw an error with theloop-entityexpression on reload, as shown here:The error can be "bypassed" by using
loop-valueas opposed toloop-entity, and this reveals that the loop is erroneously returning the location of the object in question as opposed to the object itself. For example, if you run this script and right click...... you'll receive back your own location, and the locations of entities within 5 meters of you, as opposed to the actual objects representing you and those entities.
As you may guess, this error also occurs when getting a list of entities inline (since really that's all the loop is doing too - creating the list then iterating over it). Running
send "%entities in radius 5 of player's location%"will send back the locations, not the entities.So that's really the root of the problem: referencing entities around
%object%'s locationreturns the location of captured entities, not the entities themselves. So, as you may also guess, the only valid expression in this loop (aside fromloop-value) isloop-location, which parses correctly:And, for the sake of clarity and full testing, I'll note that this bug does not affect blocks, just entities.
Hope that helps you resolve this issue -- for now, everyone experiencing it can fix it by updating their list syntaxes, but it should definitely still be fixed for the sake of backwards compatibility and common sense.