Closed DatDerpyLuke closed 3 years ago
so ironically I'm not actually a javascript expert so I don't know the correct way to do this lol
but both Synergism and Antimatter Dimensions just shove break_infinity.js into a script tag before anything that uses Decimal so they're both in the same scope, so maybe just do that?
https://github.com/Pseudonian/SynergismOfficial/blob/master/index.html
for a game that has working imports of the type you're trying to do, you can check out https://github.com/eevee/lexys-labyrinth/blob/master/js/game.js and try to figure out what it's doing differently from you. honestly, the syntax you're using looks the same so I have no immediate ideas.
sorry I'm not more help lol
You should use
import Decimal from "break_infinity.js";
instead of
import { Decimal } from "break_infinity.js";
You should use
import Decimal from "break_infinity.js";
instead of
import { Decimal } from "break_infinity.js";
Hmm... I'll try it, if it works, I'll close the thread. Anyways, ty!
I changed the code, Githubissues.
Hi... How do I import the decimal class into the main javascript file? I thought it was easier, I tried this: Either import doesn't work or I messed up the variables (most likely) Or I messed up the .add/.div/.etc Can you help me, please?