I'm making a public warp system for fun using chatgpt (i suck at coding)
but for some reason everytime it tries making a skript to list all existing warps it prints <none> every time.
Here's the skript:
command /setwarp <text>:
permission: warps.admin
trigger:
set {_warpName} to arg-1
set {_warpLocation} to location of player
set {warps::%{_warpName}%} to {_warpLocation}
add "{_warpName}" to {warpNames::*}
send "&3Warp &b%{_warpName}% &3has been set to your location."
command /delwarp <text>:
permission: warps.admin
trigger:
set {_warpName} to arg-1
if {warps::%{_warpName}%} is set:
delete {warps::%{_warpName}%}
remove "{_warpName}" from {warpNames::*}
send "&3Warp &b%{_warpName}% &3has been removed."
else:
send "&3Warp &b%{_warpName}% &3does not exist."
-- the problem:
command /warps:
permission: warps.admin
trigger:
send "&3Existing Warps:"
set {_existingWarps} to ""
loop {warpNames::*}:
add "%loop-value%" to {_existingWarps}
if {_existingWarps} is "":
send "&bNone"
else:
send "&bExisting Warps: {_existingWarps}"
--------------------------------------------------------------------
any help is greatly appreciated! thanks!
but for some reason everytime it tries making a skript to list all existing warps it prints <none> every time.
Here's the skript:
command /setwarp <text>:
permission: warps.admin
trigger:
set {_warpName} to arg-1
set {_warpLocation} to location of player
set {warps::%{_warpName}%} to {_warpLocation}
add "{_warpName}" to {warpNames::*}
send "&3Warp &b%{_warpName}% &3has been set to your location."
command /delwarp <text>:
permission: warps.admin
trigger:
set {_warpName} to arg-1
if {warps::%{_warpName}%} is set:
delete {warps::%{_warpName}%}
remove "{_warpName}" from {warpNames::*}
send "&3Warp &b%{_warpName}% &3has been removed."
else:
send "&3Warp &b%{_warpName}% &3does not exist."
-- the problem:
command /warps:
permission: warps.admin
trigger:
send "&3Existing Warps:"
set {_existingWarps} to ""
loop {warpNames::*}:
add "%loop-value%" to {_existingWarps}
if {_existingWarps} is "":
send "&bNone"
else:
send "&bExisting Warps: {_existingWarps}"
--------------------------------------------------------------------
any help is greatly appreciated! thanks!