Jump to content
  • 0

Need help setting my spawn with skript


robey24

Question

I have written the code for setting a spawn but for some reason when i try to reload my .sk file in game, it says there's issues with my lines of code. Can someone tell me how to indent and space the code or just straight up write it for me to copy and paste???

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

If your skript is showing errors, you should send your skript and the errors so people can help fix your issue. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 0
3 hours ago, robey24 said:

I have written the code for setting a spawn but for some reason when i try to reload my .sk file in game, it says there's issues with my lines of code. Can someone tell me how to indent and space the code or just straight up write it for me to copy and paste???

Hello there, I hope the below can help you.

on join: #also teleports the player to spawn only if a spawn is set.
    if {spawn} is set:
        teleport player to {spawn}

command /setspawn:
    permission: op
    executable by: players
    trigger:
        set {spawn} to player's location
        send "Spawn has been set to your location."
        
command /spawn:
    executable by: players
    trigger:
        if {spawn} is set:
            teleport player to {spawn}
        else if {spawn} isn't set:
            send "&cSpawn isn't set!"

 

Any more questions regarding this should be asked here within a month of this comment to avoid Necroposting (posting on 1 month or older threads) as per Minehut's rules.

  • Like 1

I'm just a known player who been playing since the 24 July 2019.

Please don't DM me for support, go here (if you don't mind waiting) or join Minehut's Discord (which is more active) if you need assistance.


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...