Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
So I have a loop inside a loop. I used loop-value in the first one, and I used loop-value-1 in the second loop. It errored saying I needed to it. So I tried surrounding it in parathesis and it said it did not understand this condition/effect. I tried changing it to loop-value-2 and it worked, but it shouldn't of. it should accept loop-value in the first loop and loop-value-1 in the 2nd.
Expected Behavior
Accept the usage of loop-value-1 and not count loop-value as loop-value-1
Steps to Reproduce
trigger:
loop 16 times:
set {_v::*} to circle({_loc}, 2, 1, (loop-value * (360/16)), -90)
loop {_v::*}:
draw 1 of flame at {_loc} ~ loop-value-1 with extra 0 with force
# Basic circle. step-size is in degrees.
# yaw/pitch can be used to tilt the circle in various ways
function circle(center: location, radius: number, step-size: number = 10, yaw: number = 0, pitch: number = 0) :: locations:
# refernce vector for rotation around
set {_reference} to vector from yaw {_yaw} + 90 and pitch 0
# vector to get locations with
set {_v} to spherical vector with radius {_radius}, yaw 0, pitch 0
# 360 degrees / step size = number of steps needed
loop floor(360 / {_step-size}) times:
# copy vector for rotation
set {_temp-v} to {_v}
# rotate if necessary
if {_pitch} is not 0:
rotate {_temp-v} around {_reference} by {_pitch}
# store location and move a step
set {_locs::%loop-number%} to {_center} ~ {_temp-v}
add {_step-size} to yaw of {_v}
# return list of locations
return {_locs::*}
Errors or Screenshots
Other
No response
Agreement
[X] I have read the guidelines above and affirm I am following them with this report.
Well it shouldn't accept loop-value-1, as loop-value-1 is a number, not a vector. The issue here is the content of the error message, not that it's erroring.
Skript/Server Version
Bug Description
So I have a loop inside a loop. I used loop-value in the first one, and I used
loop-value-1
in the second loop. It errored saying I needed to it. So I tried surrounding it in parathesis and it said it did not understand this condition/effect. I tried changing it to loop-value-2 and it worked, but it shouldn't of. it should accept loop-value in the first loop and loop-value-1 in the 2nd.Expected Behavior
Accept the usage of loop-value-1 and not count loop-value as loop-value-1
Steps to Reproduce
Errors or Screenshots
Other
No response
Agreement