This is error from this function.
Code:
function loadIsland(p: player, i: text):
if {creatingisland} is not true:
close {_p}'s inventory
set {creatingisland} to true
execute console command "effect give %{_p}% minecraft:blindness 1000 10"
teleport {_p} to spawn of world "newislands"
if {_p}'s world = "newislands":
set {island::%{_p}%} to true
set {move::%{_p}%} to false
add 300 to {islands}
play sound "entity.enderman.teleport" to {_p}
send "{@p} Generating..." to {_p}
wait 1 second
set {move::%{_p}%} to true
wait 1 tick
set {_loc} to location at ({islands}, (y-coordinate of {_p}), {islands}) in world "newislands"
set block below {_loc} to bedrock
set world of {_loc} to {_p}'s world
teleport {_p} to {_loc}
paste structure {_i} at {_loc}
set block under {_p} to air
wait 1 tick
if {_i} is "Plains":
teleport {_p} to {_p} ~ (vector 12, 20, 9)
else if {_i} is "Desert":
teleport {_p} to {_p} ~ (vector 10, 21, 5)
else if {_i} is "Snow":
teleport {_p} to {_p} ~ (vector 9, 20, 11)
else if {_i} is "Mesa":
teleport {_p} to {_p} ~ (vector 10, 21, 12)
else if {_i} is "Mushroom":
teleport {_p} to {_p} ~ (vector 17, 25, 15)
set {move::%{_p}%} to false
set block under block under {_p} to bedrock
send "{@p} Generating..." to {_p}
wait 1 second
set {_boundloc1} to {_p} ~ (vector 150, 86, 150)
set {_boundloc2} to {_p} ~ (vector -150, -62, -150)
create a new bound with id "%{_p}%" between {_boundloc1} and {_boundloc2}
dkit({_p})
execute console command "effect clear %{_p}%"
play sound "entity.firework_rocket.twinkle" with volume 10 and pitch 1 at {_p}'s location for {_p}
send "{@p} Welcome to your island!" to {_p}
set {move::%{_p}%} to true
set {island::%{_p}%} to true
set {islandloc::%{_p}%} to {_p}'s location
set {xc::%{_p}%} to x coordinate of {_p}
set {yc::%{_p}%} to y coordinate of {_p}
set {zc::%{_p}%} to z coordinate of {_p}
set {creatingisland} to false
else:
teleport {_p} to spawn of world "newislands"
loadIsland({_p}, {_i})
I dont understand why the error is there