I have a problem in a project. I've done a couple of tests so far and here's the situation :
No matter how many lambda functions I put in the project, no matter where they are declared, the functions declared in gmedit_lambda.gml file will always return the same (erroneous) thing OR crash the game. The content of the functions themselves do not matter. Changing the content or return type does not affect the behavior at all. Neither does changing the number of arguments.
The n-th function in the gmedit_lambda.gml file will always return the same thing, or crash in the same way, regarless of call order in the code or what they're named.
-The first 3 functions defined in the file will each return these values :
-The 4th function will crash with this error message :
==========================================
illegal access of argument, argument is not provided to script
at gml_Script_luabridge_write (line 6) - var b = argument[0], v = argument[1], d;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_luabridge_write (line 6)
called from - gml_Object_obj_debug_test_effet_Create_0 (line 111) - script_execute(test4);
===========================================
-The 5th function will crash with this error message :
==========================================
illegal access of argument, argument is not provided to script
at gml_Script_lua_call (line 8) - var q = argument[0];
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_lua_call (line 8)
called from - gml_Object_obj_debug_test_effet_Create_0 (line 104) - var theReturn5 = script_execute(test5);
===========================================
-The 6th function will simply crash the game with no error message.
The most puzzling thing is that if I create a brand new project with the exact same functions (or any lambda functions...) everything works fine. So the problem is hardly reproducible.
Providing the entire project where the problem occurs is a concern for proprietary reasons, but I'm not sure it would help anyway, seeing how big the project is and how many things are in it...