Razenpok / BreakInfinity.cs

Double replacement for numbers that go over 1e308
MIT License
212 stars 33 forks source link

NotImplementedException: The method or operation is not implemented. #16

Closed KamilChytil closed 2 years ago

KamilChytil commented 2 years ago

Hello And I wanted to start adding numbers popped up error NotImplementedException: the method or operation is not implemented. BreakInfinity.BigDouble.op_Explicit (BreakInfinity.BigDouble v) and it doesn't add or display anything anywhere. Here when I click on the error public static explicit operator float(BigDouble v) { throw new NotImplementedException(); }

Razenpok commented 2 years ago

Hi @KamilChytil

What's your code that throws this exception?

KamilChytil commented 2 years ago

BigDouble.zip in this script line 306 It happens every time I try to increase the number

Razenpok commented 2 years ago

Where did you get that file? It is different from the one in the repository https://github.com/Razenpok/BreakInfinity.cs/blob/master/BreakInfinity/BigDouble.cs#L304

KamilChytil commented 2 years ago

ohhh thans so much it works Question how do i convert float to double ?

    if (coins / clickUpgrade1Cost < 0.01)
    {
        clickUpgrade1Bar.fillAmount = 0;
    }
    else if (coins / clickUpgrade1Cost >  10)
    {
        clickUpgrade1Bar.fillAmount = 1;
    }
    else
        clickUpgrade1Bar.fillAmount = (float)(coins / clickUpgrade1Cost);

the problem is in clickUpgrade1Bar.fillAmount = (float)(coins / clickUpgrade1Cost);

Razenpok commented 2 years ago

Hmm, try changing it to

clickUpgrade1Bar.fillAmount = (float)(coins / clickUpgrade1Cost).ToDouble();

Let me know if it works

KamilChytil commented 2 years ago

ohhh its work thats so much

Razenpok commented 2 years ago

Alright, I'm closing issue if there's no more problems