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.

Solved How to find out if {_a} is a multiple of 10

Discussion in 'Skript' started by Nick, Jan 14, 2019.

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

    Nick New Member

    Joined:
    Jan 27, 2017
    Messages:
    8
    Likes Received:
    0
    Anyone know how i could find out if a number is a multiple of another number?

    For example every time a player earns 10 gold he will receive a bonus

    Using java you would do something like this

    int a = 20;

    if (a % 10 == 0) {
    # A is a multiple of 10
    }

    Thanks.
     
  2. Best Answer:
    Post #2 by SpinKnight, Jan 14, 2019
  3. SpinKnight

    Supporter + Supporter

    Joined:
    May 24, 2017
    Messages:
    30
    Likes Received:
    0
    Code (Skript):
    1. %integer% is divisible by %integer%
     
  4. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    use if mod({_a}, 10) = 0
     
  5. Nick

    Nick New Member

    Joined:
    Jan 27, 2017
    Messages:
    8
    Likes Received:
    0
    Thanks, just what I needed
     
Thread Status:
Not open for further replies.

Share This Page

Loading...