The issue was that I had two compilers installed, and I guess visual studio code didn't know which one to use, which bugged the code out. But once I deleted the first one, it seems to now work perfectly.