Discord Thread help with spawn skript

  • 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 comminuty!

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
1
0
The skUnity Discord
discord.gg
I dont understand why it doesnt work on line 14 and 13

code_language.skript:
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 {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."

Posted by: Pop from the skUnity Discord. View the thread on skUnity Discord here
 
Send error
code_language.skript:
applescript
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
        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

Posted by: harfull from the skUnity Discord.
 
code_language.skript:
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

Posted by: _grifin_ from the skUnity Discord.
 
Status
Not open for further replies.