Spawn

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

  • LOOKING FOR A VERSION OF SKRIPT?

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

Status
Not open for further replies.

Mr_pro68YT

New Member
Jul 4, 2020
9
0
1
23
So i have a spawn skript but every time the server restarts it spawns you in the regular world, i am on minehut so i cant just replace the world file, i dont use multiverse as i dont have enough plugin slots.
Code:
command setspawn:
    permission: farms.setspawn
    trigger:
        set {spawn} to player's location
        send "{@prefix} Spawn has been set at %{spawn}%"

command spawn:
    trigger:
        teleport player to {spawn}
        send "{@prefix} You have been teleported to spawn!"

on first join:
    teleport player to {spawn}
on join:
    teleport player to {spawn}

The spawn also resets every time the server stops
 
What Skript and MC version are you using? Also, if you lose all your variables at a server restart, there could be a problem with your variables.csv file. I recommend, that you should update your Skript version to the latest you can use (that depends on your server version).
 
What Skript and MC version are you using? Also, if you lose all your variables at a server restart, there could be a problem with your variables.csv file. I recommend, that you should update your Skript version to the latest you can use (that depends on your server version).
Minecraft 1.16.1 (with protocol support (same with and without it still deletes spawn)) Skript version: 2.4.1-MH
I don’t lose everything I have an eco skript, that doesn’t reset, I can’t do anything about version as I’m on minehut (I’m broke)
 
This seems odd but can u try this:

code_language.skript:
command /setspawn:
    permission: farms.setspawn
    trigger:
        set {spawn::loc} to player's location
        set {spawn::world} to player's world
        send "{@prefix} Spawn has been set at %{spawn::loc}% in world %{spawn::world}%"
 
command /spawn:
    trigger:
        set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
        teleport player to {_l}
        send "{@prefix} You have been teleported to spawn!"
 
on first join:
    set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    teleport player to {_l}
    
on join:
    set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    teleport player to {_l}
 
  • Like
Reactions: Ennas
This seems odd but can u try this:

code_language.skript:
command /setspawn:
    permission: farms.setspawn
    trigger:
        set {spawn::loc} to player's location
        set {spawn::world} to player's world
        send "{@prefix} Spawn has been set at %{spawn::loc}% in world %{spawn::world}%"
 
command /spawn:
    trigger:
        set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
        teleport player to {_l}
        send "{@prefix} You have been teleported to spawn!"
 
on first join:
    set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    teleport player to {_l}
   
on join:
    set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    teleport player to {_l}
ok my server is broken or something this doesnt work
 
Try reinstall the server, save files like plugins or skripts. Look at crash-reports or logs, maybe you'll find something there.
 
Ahhhh here is the issue "
[14:52:47] [Server thread/ERROR]: #!#! ===!!!=== Skript variable load error ===!!!===
[14:52:47] [Server thread/ERROR]: #!#! Unable to load (all) variables:
[14:52:47] [Server thread/ERROR]: #!#! 2 variables could not be loaded!
[14:52:47] [Server thread/ERROR]: #!#! Affected variables: spawn::loc, spawn::world
[14:52:47] [Server thread/INFO]: [Skript] Created a backup of variables.csv as variables_2020-07-13_14-52-47.csv
[14:52:47] [Server thread/ERROR]: #!#!
[14:52:47] [Server thread/ERROR]: #!#! Skript will work properly, but old variables might not be available at all and new ones may or may not be saved until Skript is able to create a backup of the old file and/or is able to connect to the database (which requires a restart of Skript)!
[14:52:47] [Server thread/ERROR]: #!#!
[14:52:47] [Server thread/INFO]: [Skript] Loaded 448 variables in 0.2 seconds
"

Here is variables.csv dont rlly know whats what so here is the whole thing https://hastebin.com/hijuqihiba.cpp
 
Status
Not open for further replies.