Please help with comparing block locations

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

GMAN1233

Member
Apr 1, 2022
2
0
1
My code doesnt want to compare block locations
Specificaly:
if block above event-block = block at {n::2}:
send "yes" to player
remove "%{n::1}%$%{n::2}%" from {Portal::*}
send "&cDebug 4 %loop-value-2%" to player
send "&cPortal: %loop-value-2% Removed" to player

The code doesnt continue past the if statement

Here is the rest of my Code

On Portal Create:
if block below player is beacon:
add block below player's location to {beacons::*}
set {loc} to block at player's location
add block below player's location to {beacons::*}
set {isRegistering::%player%} to true
send "&fPlease name this Portal" to player
send "&fType &cCancel&f to cancel registration of portal" to player
on chat:
if {isRegistering::%player%} is set:
set {Name} to message
cancel event
if {Name} does not contain "cancel" or "Cancel":
if {Portal::%{Name}%} is not set:
send "§aPortal: %{Name}% created!" to player
clear {isRegistering::%player%}
add "%{Name}%$%{loc}%" to {Portal::*}
else:
send "§ca Portal with that name exists!" to player
On player move:
if {isRegistering::%player%} is set:
cancel event
on mine of beacon:
send "&cDebug ya broke a beacon" to player
loop {beacons::*}:
send "&cDebug %loop-value-1%" to player
if event-block is within 1 blocks of loop-value-1:
send "&cDebug 1 %loop-value-1%" to player
loop {Portal::*}:
send "&cDebug 2 %loop-value-2%" to player
set {n::*} to loop-value-2 split at "$"
send "&cDebug 3 %{n::1}% and %{n::2}%" to player
send "%block above event-block%"
if block above event-block = block at {n::2}:
send "yes" to player
remove "%{n::1}%$%{n::2}%" from {Portal::*}
send "&cDebug 4 %loop-value-2%" to player
send "&cPortal: %loop-value-2% Removed" to player
on portal:
if player is sneaking:
cancel event
teleport player to {loc}
send "yes" to player

[doublepost=1687274460,1687274429][/doublepost]please let me know if i should paste the code in another manner
[doublepost=1687274537][/doublepost]its supposed to be a portal skript but i cant get past a delete feature to do the rest of the skript