Hx:298: characters 1-8 : Build failure

I tried building with lime test windows, but then this appeared :

PS C:\Funkin-master> lime test windows
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 43-47 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 68-72 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 43-65 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 68-90 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 94-98 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 94-102 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:45: characters 21-25 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 56-60 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 81-85 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 56-78 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 81-103 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 107-111 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 107-115 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:55: characters 21-25 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:62: characters 13-17 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:70: characters 16-20 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:72: characters 60-64 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:81: characters 15-19 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/Int64Helper.hx:80: characters 7-11 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/Int64Helper.hx:80: characters 7-11 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 56-60 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 81-85 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 56-78 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 81-103 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 107-111 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:52: characters 107-115 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:55: characters 21-25 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 43-47 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 68-72 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 43-65 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 68-90 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 94-98 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:43: characters 94-102 : Void should be Float
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:45: characters 21-25 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:62: characters 13-17 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:70: characters 16-20 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:72: characters 60-64 : Module Math does not define type Math
C:\HaxeToolkit\haxe\std/haxe/io/FPHelper.hx:81: characters 15-19 : Module Math does not define type Math
C:/Haxe directory/flixel/4,9,0/flixel/graphics/tile/FlxDrawBaseItem.hx:9: characters 8-32 : Type not found : openfl.display.Tilesheet
C:/Haxe directory/flixel/4,9,0/flixel/graphics/tile/FlxDrawTilesItem.hx:10: characters 8-32 : Type not found : openfl.display.Tilesheet
C:/Haxe directory/flixel/4,9,0/flixel/graphics/FlxGraphic.hx:15: characters 8-32 : Type not found : openfl.display.Tilesheet
export/release/windows/haxe/ApplicationMain.hx:298: characters 1-8 : Build failure

I was able to build fine before this. Maybe i touched something i didn’t have to, i don’t really know.
How do i fix it?

This happens to me if there’s a function or class that can’t be found somewhere. Maybe you moved a class and didn’t update the package name?

I moved an image, modified it and replace it but I didn’t change the name. I also added a new characters in the codes. That is all I did for the moment.

Can you clarify what you mean? Did you add/modify code and then the errors started?

Yes, in the funkin-master file, I added a new characters on the character.hx file, and I also modified the images that were on the assets file. To be more clear I was following this tutorial on youtube : https://www.youtube.com/watch?v=jNwkEJ3-rXA&t=318s&ab_channel=BrightFyre
For some reason Im now getting this error even if I followed the tutorial without omit anything.
Sorry if my english is not that good.

Does it work when you try to build for other platforms?

If it does, try cleaning your windows build and then rebuilding.

I tried, it does not work.
I was also watching the error and i noticed that it says Type not found : openfl.display.Tilesheet.
Maybe I moved that on accident?

You can just navigate to your local OpenFL install and see if openfl\display\TileSheet.hx is there. It’d be in C:\HaxeToolkit\haxe\lib\openfl and then in whatever folder you have set in your .current file.

But again, I’ve gotten errors about files not found because of a mistake in my syntax before and fixing the syntax made the errors go away.

What versions of Haxe, OpenFL, and Flixel are you using?

Haxe 4.1.5
Openfl 9.1.0
haxeflixel 4.9.0

I also searched in the files if there is a Tilesheet.hx in there, but I didn’t found it. I finded Tls.hx but i don’t is the same thing.

Oh, I see…I assumed it was was a part of the Tilemap system.

Apparently, Tilesheet was removed in OpenFL 4 according to this post: Type not found : openfl.display.Tilesheet

It looks like it’s still referenced in the Haxeflixel code if FLX_DRAW_QUADS isn’t set. Take a look at the source code for FlxBaseItem here and you can see where it’s checking for it near the top:

So maybe set it in your project.xml file?

Ok I see. But what do you mean by set it in the project.xml file? Do I copy the flxdrawbaseitem code and paste it in the project.xml file?

Since HaxeFlixel piggybacks off of OpenFL, there should be a project file somewhere, like in the images shown in this documentation:

And mentioned here:

Now, I don’t use Haxeflixel, so I can’t be 100% certain, but my guess is you’ll have to add the FLX_DRAW_QUADS flag in your project.xml file somewhere like so:

<define name="FLX_DRAW_QUADS" />

Also, I poked at the Haxe Discord and someone has the exact same issue as you a few weeks ago. Apparently FLX_DRAW_QUADS should already be defined in some of the HaxeFlixel macros.

Have you run these commands?

haxelib run lime setup flixel
haxelib run lime setup windows
haxelib run lime build windows

It seems that I forgot to run the last two commands, maybe that is the problem.
With the haxelib run lime setup windows command, it says that i need a C++ compiler. It’s weird because i already have Visual studio community installed.

You may have Visual Studio installed, but you also need to run VS at least once to install the build tools for C++ development (and any other tools you’d optionally like to have) if you haven’t already.