Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Adds a condition for is divisible by

Open EquipableMC opened this issue 1 year ago • 5 comments

Description

This PR simply adds a condition to check if a number is divisible by another number, without having to use the mod function.


Target Minecraft Versions: any Requirements: none Related Issues: none

EquipableMC avatar Sep 21 '24 12:09 EquipableMC

and tests!

😭 okay

EquipableMC avatar Sep 21 '24 12:09 EquipableMC

I believe a negated version of the pattern should exist. Something like if {_number} is not divisible by 8: should be possible.

added!

EquipableMC avatar Sep 21 '24 13:09 EquipableMC

I do not understand why tests are failing, if someone can help point it out that would be nice

EquipableMC avatar Sep 24 '24 00:09 EquipableMC

I do not understand why tests are failing, if someone can help point it out that would be nice

You should read the build logs

Failed:
  is divisible (on 2 environments)
    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.20.6)
    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.21.0)

TenFont avatar Sep 24 '24 10:09 TenFont

I do not understand why tests are failing, if someone can help point it out that would be nice

You should read the build logs


Failed:

  is divisible (on 2 environments)

    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.20.6)

    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.21.0)

I have, it just doesn't tell me WHY it's failing.

EquipableMC avatar Sep 24 '24 10:09 EquipableMC