Variables are Really Long

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

Tropical

Member
Jan 29, 2017
19
0
1
29
code_language.skript:
on first join:
    wait 2 seconds
    set {rerolls.%player%.credits} to 1
    send "&c&lREROLL &7You have received one free Reroll Credit for joining!"
    send "&c&lREROLL &7Use &c/reroll&7 to reroll spawner types!"

command /reroll:
    trigger:
        if player is holding monster spawner:
            if {rerolls.%player%.credits} is greater or equal to 1:
                remove 1 from {rerolls.%player%.credits}
                remove 1 mob spawner from player's inventory
                make console execute command "/mms give %player% 1"
                send "&c&lREROLL &7You have &c%{rerolls.%player%.credits}% Reroll Tokens&7 left. Buy more Rerolls on our store: &cwww.store.cynicalsb.com"
            else:
                send "&c&lREROLL &7You do not have enough Reroll Tokens! Buy Rerolls on our store: &cwww.store.cynicalsb.com"
        else:
            send "&c&lREROLL &7You are not holding a Monster Spawner!"
            
command /rerollgive <player>:
    permission: reroll.admin
    trigger:
        add 1 to {rerolls.%arg-1%.credits}
        send "&c&lREROLL &7You added &c1&7 Reroll to &c%arg-1%&7."
        
command /rerolls:
    trigger:
        send "&c&lREROLL &7You have &c%{rerolls.%player%.credits}%&7 Reroll Tokens."

Whenever doing /rerollgive <player>, it sets the variable
to a long number such as
rerolls.wrangle.credits, long, 0000000000000001
rerolls.wrangle.credits, double, 4000000000000000
rerolls.wrangle.credits, double, 4008000000000000
rerolls.wrangle.credits, double, 4010000000000000

When I want it to just be a number such as 0, 1, 2, 3.
[doublepost=1506034913,1506034864][/doublepost]^ and if Skript automatically sets numbers to something huge, why does it create multiple variables of the same thing?
 
You don't need to worry about that and you should never open or edit variables.csv, its a shitty idea and there's no reason to do it
 
You don't need to worry about that and you should never open or edit variables.csv, its a shitty idea and there's no reason to do it
I kind of need to worry about it as it's setting a simple variable to a huge number, multiple times.
Imagine the effect it would have on a large playerbase, searching through all of those variables.

(and this is on my test server, so my variables file is fine)
 
I kind of need to worry about it as it's setting a simple variable to a huge number, multiple times.
Imagine the effect it would have on a large playerbase, searching through all of those variables.

(and this is on my test server, so my variables file is fine)
No you don't need to worry. It will be fine, it doesn't "search through all those variables". Variables are loaded into memory on load.
 
Status
Not open for further replies.