GMS 2.3+ Nesting functions

Status
Not open for further replies.

Dev_M

Member
Hello,

I wonder if this is a bug or not...

func_1 = function(){
code
}

func_2 = function(){

func_1();
code
}


When I place this in a create event, it calls the func_1 code without me executing func_2....
Is this a bug or is it not allowed to nest functions like this?

Im on latest version.


Thanks in advance
 

rytan451

Member
If your code looks like this:

GML:
/// @desc Create event

a = function() {
    show_debug_message("first function called");
}

b = function() {
    a();
    show_debug_message("second function called");
}
If your debug log shows first function called, then there is probably a bug. I'll see if I can reproduce this bug on my end. Cannot reproduce. Are you sure you aren't calling either of these functions?
 

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
I'll be closing this topic because, as of writing, 2.3 questions should not be posted on here, but in the beta forum. The GMC will be open for 2.3-related questions once a stable build is released. Until then, please use the beta forum.
 
Status
Not open for further replies.
Top