Loop-Entity issue

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

DJ_Dogos

Member
Dec 19, 2023
49
0
6
15
Hello. i have a half my script here, and it says an error in "set {_PEL} to location of looped-entity"

Code:
on right click:
    if name of player's tool contains "&fBlaze Storm":
        if {blazestorm.%player's uuid%} is not set:
            set {blazestorm.%player's uuid%} to 60
            set {_PE} to position of player
            loop entities in radius 10 around {_PE}:
                set {_PEL} to location of looped-entity
                set {_PELA} to location 5 meters above {_PEL}
 
Hello. i have a half my script here, and it says an error in "set {_PEL} to location of looped-entity"

Code:
on right click:
    if name of player's tool contains "&fBlaze Storm":
        if {blazestorm.%player's uuid%} is not set:
            set {blazestorm.%player's uuid%} to 60
            set {_PE} to position of player
            loop entities in radius 10 around {_PE}:
                set {_PEL} to location of looped-entity
                set {_PELA} to location 5 meters above {_PEL}
Hello! I've ran into this issue before too. The easiest way to fix this is to consider different script variables and what a location is. The variable you're currently using to try and set the location can only hold one value. A location in script contains at least three values, the X, Y and Z position. To store those values change {_PE}, {_PEL} and {_PELA} to list variables (Click out link on how to use list variables if needed).
 
Can u tell What you mean in it?
Your variable, {_PEL} can only store a singular value. Like any number or text. You’re trying to store an entire location into that variable which includes at least three different numbers. Which is why you should use a list variable, that can save as much info as you want.
 
Your variable, {_PEL} can only store a singular value. Like any number or text. You’re trying to store an entire location into that variable which includes at least three different numbers. Which is why you should use a list variable, that can save as much info as you want.
its not an error in the {_pel} ..., its in the looped-entity if i change it to player, it will work