fidbro
(fidbro237)
July 11, 2021, 7:07pm
1
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!
ibilon
(Valentin Lemière)
July 11, 2021, 7:17pm
2
Make sure the file is named Main.hx
with an uppercase M, and that the Project.xml
contains the line <classpath name="source" />
.
fidbro
(fidbro237)
July 11, 2021, 7:20pm
3
it does, i’m gonna lime test it. i’ll bring you the results in a moment
fidbro
(fidbro237)
July 11, 2021, 7:26pm
4
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
ibilon
(Valentin Lemière)
July 11, 2021, 7:44pm
5
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.
dean
July 11, 2021, 7:53pm
6
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
}
kLabz
(Rudy Ges)
July 12, 2021, 7:50am
7
openfl.system.System.exit
already does that (well, it calls lime’s System.exit
which does )
witch file ApplicationMain.hx or