#help with spawn skript

1 messages · Page 1 of 1 (latest)

raw wharf
#

I dont understand why it doesnt work on line 14 and 13 (else if player's location is {spawnlocation})

    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        set {spawnlocation} to player's position
        send "&aThe spawn has been set!" to player

command /spawn:
    trigger:
        if {spawnlocation} is set:
            teleport player to {spawnlocation}
            send "&aYou have been teleported to spawn!" to player 
        else if player's location is {spawnlocation}:
            send "&aYou are already at spawn!" to player
        else:
            send "&cThe spawn has not been set!" to player

command /removespawn:
    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        if {spawnlocation} is set:
            send "&cThe spawn has been removed." to player
            delete {spawnlocation}
        else: 
            send "&cThe spawn has already been removed."
elder mist
#

Send error

#
command /setspawn:
    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        set {spawnlocation} to player's position
        send "&aThe spawn has been set!" to player

command /spawn:
    trigger:
        if player's location is {spawnlocation}:
          if {spawnlocation} is set:
            teleport player to {spawnlocation}
            send "&aYou have been teleported to spawn!" to player 
          else:
            send "&cThe spawn has not been set!" to player
        else:
          send "&aYou are already at spawn!" to player

command /removespawn:
    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        if {spawnlocation} is set:
            send "&cThe spawn has been removed." to player
            delete {spawnlocation}
        else: 
            send "&cThe spawn has already been removed."```
#

.indent

#

learn indenting

raw wharf
#

doesnt work 3 errors

bold plover
obtuse plover
# raw wharf doesnt work 3 errors
command /setspawn:
    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        set {spawnlocation} to player's position
        send "&aThe spawn has been set!" to player

command /spawn:
    trigger:
        if player's location is {spawnlocation}:
            if {spawnlocation} is set:
                teleport player to {spawnlocation}
                send "&aYou have been teleported to spawn!" to player 
            else:
                send "&cThe spawn has not been set!" to player
        else:
            send "&aYou are already at spawn!" to player

command /removespawn:
    permission: admin.permission
    permission message: &cYou cannot use this command!
    trigger:
        if {spawnlocation} is set:
            send "&cThe spawn has been removed." to player
            delete {spawnlocation}
        else: 
            send "&cThe spawn has already been removed."```
lol only bad tabs