I have come to skript after a few years and I am skripting again, so I might have forgetten how most things work. Anway here is my code
The aim is to teleport a a player to another player but 20 blocks away
errors:
Code:
else if arg 1 is "chase":
if arg 2 is set:
if world is "world":
set {_x%arg-2%} to x-coordinate of %arg-2%
set {_y%arg-2%} to y-coordinate of %arg-2%
set {_z%arg-2%} to z-coordinate of %arg-2%
add 20 to {_x%arg-2%}
while {searching_for_loc} is true:
set {_loc} to location at {_x%arg-2%},{_y%arg-2%},{_z%arg-2%}
set {_block} to block at {_loc}
if {_block} is air:
if the block above {_block} is air:
if the block below {_block} is not air:
if the block below {_block} is not lava:
set {teleport_loc} to {_loc}
set {searching_for_loc} to false
wait a tick
teleport player to location at {_x%arg-2%},{_y%arg-2%},{_z%arg-2%} in world "world"
The aim is to teleport a a player to another player but 20 blocks away
errors:
Code:
>.... [15:12:15 ERROR]: Can't understand this expression: 'x-coordinate of %arg-2%' (test.sk, line 22: set {_x%arg-2%} to x-coordinate of %arg-2%')
>.... [15:12:15 ERROR]: Can't understand this expression: 'y-coordinate of %arg-2%' (test.sk, line 23: set {_y%arg-2%} to y-coordinate of %arg-2%')
>.... [15:12:15 ERROR]: Can't understand this expression: 'z-coordinate of %arg-2%' (test.sk, line 24: set {_z%arg-2%} to z-coordinate of %arg-2%')
>.... [15:12:15 ERROR]: {_loc} can only be set to one object, not more (test.sk, line 27: set {_loc} to location at {_x%arg-2%},{_y%arg-2%},{_z%arg-2%}')
>.... [15:12:15 ERROR]: Can't understand this condition/effect: teleport player to location at %{_x%arg-2%}%,%{_y%arg-2%}%,%{_z%arg-2%}% in world "world" (test.sk, line 36: teleport player to location at %{_x%arg-2%}%,%{_y%arg-2%}%,%{_z%arg-2%}% in world "world"')