#What have I done wrong with this variable?

1 messages · Page 1 of 1 (latest)

lapis dove
#

I'm not sure if I'm either calling or setting the variable wrong. But when I do /dungeonlb sewer VerticalTerms 1 and then check the variable with /dungeoncheck, it gives me a 0 instead of a 1.

#

I thought that would embed the file to read here. This is the file so you don't have to download:

    {sewer::%player%} = 0

command /dungeonlb <text> <player> <integer>:
    permission: skript.dungeonlb
    trigger:
        add arg-3 to {arg-1::arg-2}

command /dungeoncheck:
    trigger:
        message "%{sewer::%player%}%" to player```
#

Ok, so I got it to work with this code:

    {sewer::%player%} = 0

command /dungeonlb <text> <player> <integer>:
    permission: skript.dungeonlb
    trigger:
        set {_player} to arg-2
        set {_dungeon} to arg-1
        add arg-3 to {%{_dungeon}%::%{_player}%}

command /dungeoncheck:
    trigger:
        message "%{sewer::%player%}%" to player```
But I'd appreciate it if someone could take a look to make sure this is properly
rich wolf
#

You were just missing percents in the original

#

If youre gonna set the args to local vars, might as well do that from the beginning:command kill <target:player>: kill {_target}

lapis dove
#

Interesting. Thank you.

The variable values don't seem to be surviving a restart though. variables.csv is empty even after running the command. Is there a step I'm missing to save the variable for long-term use?

rich wolf
lapis dove
#
    {sewer::%player%} = 0

command /dungeonlb <text> <player> <integer>:
    permission: skript.dungeonlb
    trigger:
        add arg-3 to {%arg-1%::%arg-2%}

command /dungeoncheck:
    trigger:
        message "%{sewer::%player%}%" to player```
#

When I do /dungeonlb sewer VerticalTerms 1 and then /dungeoncheck it returns a value of 1, but variables.csv is still empty.

rich wolf
#

Ah, thats what you meant

#

The csv will sync on server stop