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

Removing numbers from a Variable

Discussion in 'Skript' started by Goodmaster1233, Jan 30, 2020.

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

    Joined:
    May 6, 2019
    Messages:
    34
    Likes Received:
    0
    why doesn't
    remove 1 from {mutetime} work?
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    427
    Likes Received:
    30
    Give us your code and any errors that you might receive from that code.
     
  3. Goodmaster1233

    Joined:
    May 6, 2019
    Messages:
    34
    Likes Received:
    0
    My code is: remove 1 from (mutetime.%loop-player)
    Errors: None
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    427
    Likes Received:
    30
    Your full code, I meant. Sorry.
     
  5. Govindas

    Govindas Active Member

    Joined:
    Feb 5, 2017
    Messages:
    79
    Likes Received:
    5
    it must be a number to be able to remove, also %loop-player is not valid, it must be %loop-player%

    and I recommend a better variable format, such as {mutetime::%uuid of loop-player%}

    and if you are making a timer by removing 1 from it every time, that is not efficient, you should instead save it to a date and compare dates to check if mute has expired, not a constant auto-reduction (much better on performance)
     
  6. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    427
    Likes Received:
    30
    I did that with my temporary punishments by using unix timestamps but it was variable hell :joy:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...