Solved Transfer variables from skript to 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!

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

AlfaLe0

Member
Mar 2, 2018
25
0
0
34
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
 
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
Reactions: AlfaLe0
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
Reactions: AlfaLe0
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.
Yes, can you say me the difference between {xp.%player%} {xp::%player%} ? I don’t understand
 
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_language.skript:
delete {xp::*}
also {xp::%player%} can easily be called with {xp::*} if you want to get all of them
 
  • Like
Reactions: AlfaLe0
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_language.skript:
delete {xp::*}
So only for deleting the variables is useful?
 
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
Reactions: AlfaLe0
Status
Not open for further replies.