Hi, i have this problem, i tried to do function nearestEntity.
When i run '/nearest' nothing happens
Skript is without error
Code:
command /nearest:
trigger:
set {_n} to nearestEntity(player)
broadcast "%{_n}%"
function nearestEntity(player: player):
loop all entities in world of {_player}:
loop-entity is not {_player}
set {_dist} to (distance between {_player} and loop-entity *1000) + (random integer between 0 and 999)/1000
set {_list::%{_dist}%} to loop-entity
set {_r} the first element of {_list::*}
return {_r}
When i run '/nearest' nothing happens
Skript is without error