Hi Hugh, what was this game made with?
bowsette_game
Creator of
Recent community posts
I get the following error when attempting to run my project:
Variable <unknown_object>.gml_compile_init(116068, -2147483648) not set before reading it. at gml_GlobalScript_GMLive (line 5483) - if(live_enabled)gml_compile_curr_script=gml_compile_init(); ############################################################################################ gml_GlobalScript_GMLive (line 5483)
I'm using version 1.0.71 for GMS2.3 and GMS2022+. I could not find the gml_compile_init function anywhere in the code. The GMLive_Compiler file is empty - not sure if this is related.
So, it seems that in 99% of the time you end up with an init script you need to call before using Haxe functions. I was wondering, is it viable to generate it so it's like this:
gml_pragma("global", "init_function()");
gml_pragma can be used from inside an extension, right?
As a side question, how should we handle things if we have multiple packages and we want to use them in a single project? I'd guess it would cause conflicts outside of the box if you don't do anything.
A global toggle for live functions (and maybe the live_enabled macro) would also really help when pushing your project to a public repository.
I've tried using GMEdit's global replacement but it had weird behavior sometimes (it would comment the line, but also put them on the same line as the #event line).
I'm using 1.4.9999.
This is the error:
Error : got '?' expected ')'
Edit: putting a few more bracers in the generated code solved it. Essentially, there is a statement with multiple ternary operators, and I changed them like that:
(a) ? b : c --> ((a) ? b : c)
And it worked perfectly afterwards. Any idea on why it doesn't work out of the box?
I'm trying to compile a project using the following command:
haxe -debug -lib sfhx -lib sfgml -cp src -js ../extensions/Haxe.extension.gmx._ -main Class -dce full -D sfgml-assets-path=../my_project.project.gmx -D sfgml_snake_case -D sf_pretty -D sfgml_local=_
It compiles successfully from Haxe, but the generated code uses ternary operators, which is throwing errors when compiling the GMS1 project. I double checked the build.hxml file and sfgml_next isn't present.
However, if I target a .gml file, the compiler replaces ternary operators with the if;else equivalent code, and it works fine. I've also noticed that targeting the gmx._ file seems to get rid of auxiliary local variables and substitutes them for their values.
Welp, can't believe it was just a typo all this time. Thank you very much!
Is there any way to submit merge requests to the documentation? I couldn't find the directives I asked about, so I would like to help putting them there if possible (even if it means pretty much copy-pasting your explanation).I see, thanks for clarification.
I'm attempting to use this to build the project:
haxe -debug -lib sfhx -lib sfgml -cp src -js ../extensions/Haxe.extension.gmx_ -main Class -dce full -D sfgml-assets-path=../my_project.project.gmx -D sfgml_snake_case -D sf_pretty -D sfgml_local=_
This generates a Haxe.extension.gmx_ file which contains the generated GML code. The original .gmx file remains untouched, and so does the blank script you need to create when setting it up. Is that expected?
I've checked the files with external editors to be sure the IDE wasn't just failing to load changes.
Also, sorry for asking for support here, is there a better/preferable channel?
Sorry for my ignorance, but what "define macros properly" mean here? I thought GMS1 only allowed you to put macros in a special file, not in-line.
Also, is there any way to automatically generate the function calls for extension? It seems you have to manually add them to the GMS1 IDE before being able to actually call Haxe. Any way around this?
Also, after compiling, I've copied the code inside the .gmx_ file and put it inside the extension's .gml file, is that correct?
Thanks for the release, this is incredible.
Could you please explain what these directives do? Also, any specific reason the target file in the doc example is a .gmx file, and not a .gml script?
sfgml-spaces sfgml-hex
Also, I've noticed that, by default, the helper scripts try to pass 2 arguments into array_create, which has issues compiling with GMS1. They work fine by just removing the second argument, though (it was 0).