Type not found : Main

hi, i’m a new haxeflixel coder and am interested in fnf. however, i was trying to port a specific mod to html5, when this error occured.

exportJon/release/html5/haxe/ApplicationMain.hx:299: characters 48-52 : Type not found : Main

yes, main.hx exists in the source folder, and i don’t feel like it’s been edited in any way to make it function the wrong way

if someone knows how to fix this, help would be greatly appreciated!

Make sure the file is named Main.hx with an uppercase M, and that the Project.xml contains the line <classpath name="source" />.

it does, i’m gonna lime test it. i’ll bring you the results in a moment

i got a few other errors

source/OnslaughtEndingState.hx:107: characters 19-23 : Accessing this field requires a system platform (php,neko,cpp,etc.)
source/EndingState.hx:120: characters 21-25 : Accessing this field requires a system platform (php,neko,cpp,etc.)
source/GameOverSubstate.hx:86: characters 10-14 : Accessing this field requires a system platform (php,neko,cpp,etc.)

here is the source code of the mod/game i’m trying to build

All three are Sys.exit(0); which as the error indicate needs a sys target, and javascript (html5) is not.

If you replace those with openfl.system.System.exit(0); it should work.

you can use something like this to handle the different targets

function exit() {
    #if (windows || cpp)
        Sys.exit(0);
    #else
        openfl.system.System.exit(0);
    #end                
}

openfl.system.System.exit already does that (well, it calls lime’s System.exit which does)

witch file ApplicationMain.hx or