1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spawn

Discussion in 'Skript' started by Mr_pro68YT, Jul 12, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. Mr_pro68YT

    Mr_pro68YT New Member

    Joined:
    Jul 4, 2020
    Messages:
    9
    Likes Received:
    0
    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 (Text):
    1. command setspawn:
    2.     permission: farms.setspawn
    3.     trigger:
    4.         set {spawn} to player's location
    5.         send "{@prefix} Spawn has been set at %{spawn}%"
    6.  
    7. command spawn:
    8.     trigger:
    9.         teleport player to {spawn}
    10.         send "{@prefix} You have been teleported to spawn!"
    11.  
    12. on first join:
    13.     teleport player to {spawn}
    14. on join:
    15.     teleport player to {spawn}
    The spawn also resets every time the server stops
     
  2. AdiihYT

    AdiihYT Member

    Joined:
    Aug 17, 2017
    Messages:
    3
    Likes Received:
    0
    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).
     
  3. Mr_pro68YT

    Mr_pro68YT New Member

    Joined:
    Jul 4, 2020
    Messages:
    9
    Likes Received:
    0
    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)
     
  4. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    This seems odd but can u try this:

    Code (Skript):
    1. command /setspawn:
    2.     permission: farms.setspawn
    3.     trigger:
    4.         set {spawn::loc} to player's location
    5.         set {spawn::world} to player's world
    6.         send "{@prefix} Spawn has been set at %{spawn::loc}% in world %{spawn::world}%"
    7.  
    8. command /spawn:
    9.     trigger:
    10.         set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    11.         teleport player to {_l}
    12.         send "{@prefix} You have been teleported to spawn!"
    13.  
    14. on first join:
    15.     set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    16.     teleport player to {_l}
    17.    
    18. on join:
    19.     set {_l} to location x-coordinate of {spawn::loc}, y-coordinate of {spawn::loc}, z-coordinate of {spawn::loc} in world {spawn::world}
    20.     teleport player to {_l}
     
    • Like Like x 1
  5. Mr_pro68YT

    Mr_pro68YT New Member

    Joined:
    Jul 4, 2020
    Messages:
    9
    Likes Received:
    0
    ok my server is broken or something this doesnt work
     
  6. xCoini

    xCoini Member

    Joined:
    Apr 19, 2019
    Messages:
    14
    Likes Received:
    0
    Try reinstall the server, save files like plugins or skripts. Look at crash-reports or logs, maybe you'll find something there.
     
  7. Mr_pro68YT

    Mr_pro68YT New Member

    Joined:
    Jul 4, 2020
    Messages:
    9
    Likes Received:
    0
    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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...