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 our 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.

Solved Transfer variables from skript to skript

Discussion in 'Skript' started by AlfaLe0, Mar 2, 2018.

Thread Status:
Not open for further replies.
  1. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    I have a skrip with a variable {xp.%player%} but I need the same variables for another skript.... is possible to import it? In case, how to?
    Ps sorry for my bad English

     
  2. Best Answer:
    Post #3 by Snow-Pyon, Mar 3, 2018
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    You would import into any of your Skripts the same way for each.
    Variables are universal between all of your Skripts as long as they're spelled the same for each
     
    • Like Like x 1
  4. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,234
    Likes Received:
    172
    Medals:
    1. Don't use that variable naming, it's a horrible way to do it. Naming them like {xp::%player's uuid%} would be better.
    2. If you mean you want use the same variables in another server, just copy and paste the variables.csv from the first server to the another one; if you're talking about using that variable in another script, you don't have to do anything, you're able to use it in any script as it's global.
     
    • Like Like x 1
  5. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    Yes, can you say me the difference between {xp.%player%} {xp::%player%} ? I don’t understand
     
  6. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    If you use {xp.%player%}, and for some reasons you want to delete all the xp variables, you need to have a offline player list, loop it and delete it for every player. If you use {xp::%player%}, and want to delete it, you can easily use
    Code (Skript):
    1. delete {xp::*}
    also {xp::%player%} can easily be called with {xp::*} if you want to get all of them
     
    • Like Like x 1
  7. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    So only for deleting the variables is useful?
     
  8. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    You can use it for other things as well, for example if you want to give everyone a xp boost, you can use loop {xp::*}, and then do something with it.
     
    • Like Like x 1
  9. AlfaLe0

    AlfaLe0 Active Member

    Joined:
    Mar 2, 2018
    Messages:
    25
    Likes Received:
    0
    Thanks
     
Thread Status:
Not open for further replies.
Loading...