First of all, I am not a native speaker, sorry for my english!
Although I code java, I am very new to skript, so this will probably be a trivial thing that I am missing here.
My code just will not set the variable and whenever I step on a portal it will say it does not have a target.
on break end portal frame:
if event-player is sneaking:
cancel event
set {selectedPortal} to event-block
send action bar "§b§lSelected portal! Do '/portal settarget' to set the portal target!" to event-player
command /portal settarget:
permission: portal.settarget
trigger:
set {portals.selectedPortal} to event-player's location
send action bar "§b§lPortal target set! Now just walk over it!" to event-player
on walk on end portal frame:
if {portals.event-block} is not set:
send action bar "§c§lThis portal does not have a target yet!" to event-player
stop trigger
teleport event-player to {portals.event-block}
play sound "entity.enderman.teleport" with volume 1 and pitch 1 to event-player