Solved Variable with case sensitive usernames.

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

    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.

GToTheG

Member
Jan 26, 2017
35
0
8
You know when you set an variable to an players name, ex. "JackyChase" but in the variable it shows "jackychase". How do you make sure that the variable is with uppercase the right places in the name?

How to make an username case sensitive in an variable?

/Thanks/GToTheG
 
There is an option into the config file of Skript
 
You know when you set an variable to an players name, ex. "JackyChase" but in the variable it shows "jackychase". How do you make sure that the variable is with uppercase the right places in the name?

How to make an username case sensitive in an variable?

/Thanks/GToTheG
You may can to that:
code_language.skript:
Set {var} to ("%player%" parsed as offline player)
But why do you need case sensitive variables?
 
You may can to that:
code_language.skript:
Set {var} to ("%player%" parsed as offline player)
But why do you need case sensitive variables?


Because the variable needs to be show in chat.
[doublepost=1494315744,1494315655][/doublepost]
There is an option into the config file of Skript

Yeah but i mess with all other variables to because its Not is case sensitive, it needs to be only names.
 
Ooh , now i understand what you need.
Let me come back at home , and i'll write to you the code.

EDIT: Done , you need SkStuff
code_language.skript:
        set {_name} to "%player's name%"
        set {_lenght} to length of {_name}
        set {_char} to the first character of {_name}
        set {_name} to "%subtext of {_name} from character 2 to {_lenght}%"
        set {_char} to "%convert {_char} to all caps%"
        set {_final-name} to "%{_char}%%{_name}%"
 
Last edited by a moderator:
  • Like
Reactions: GToTheG
You know when you set an variable to an players name, ex. "JackyChase" but in the variable it shows "jackychase". How do you make sure that the variable is with uppercase the right places in the name?

How to make an username case sensitive in an variable?

/Thanks/GToTheG

You should never ever use player names for your variables. Use the UUID option instead.
 
For don't have this issue anymore I recommend you put the player's uuid (as @bi0 suggested above while I'm writing this) as index instead of their name like the following example:
code_language.skript:
set {example::%player's uuid%} to true
Then for get their name you can do the following:
code_language.skript:
loop {example::*}:
    set {_player} to "%loop-index%" parsed as offline player
Although that will only work if you're using the Bensku's fork (uuid -> offline player was added in that fork). If that's not the case you can use TuSKe:
code_language.skript:
loop {example::*}:
    set {_player} to offline player from uuid "%loop-index%"
 
  • Like
Reactions: GToTheG
Status
Not open for further replies.