Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Further info:

It was somehow calling a function I don't reference anywhere involving your extension. I have a struct in oGame.network with a method called "connect". After typing "message" and hitting space, it runs that connect function. Here's the call stack:

EDIT: I went through the following trying to trace down the issue and I finally figured it out. Your library figures out if a script is a constructor by trying to create one. "Network" is a constructor, and when it's constructed it initiates a connection to my server. By creating a new Network, all of the initialization code is running again. I was able to fix it by changing your __ezConsole_dep_is_constructor to:

function __ezConsole_dep_is_constructor(_func){
    return asset_has_tags(_func, ["@@constructor"], asset_script);
}

--------

Original exploration:

 at gml_Script___ezConsole_dep_is_constructor (line 198) -               if (string_pos("constructor", err.message))
############################################################################################
gml_Script___ezConsole_dep_is_constructor (line 198)
gml_Script___ezConsole_dep_get_asset_names (line 179) -               if (_asset_type == asset_script && __ezConsole_dep_is_constructor(_ids[@ i]) && (string_pos("EzConsole", _name))) continue;
gml_Script_console_typeahead_get_names (line 510) -               room:       __ezConsole_dep_get_asset_names(asset_room),
gml_Script_console_get_typeahead (line 218) -                      _names = console_typeahead_get_names(_arg_type);
gml_Object___EzConsole___Step_0 (line 229) -                      ? console_get_typeahead(console_text_actual)

So when I type "broadcast" and then "space", I get this (with values plugged in):

__EzConsole__.Step line 229: console_get_typeahead( "broadcast ")

ezConsole_logic line 126:

function console_get_typeahead("broadcast "){
    var _msg_trimmed = ["broadcast",""];
    var _is_command = false;
    var _suggestions = [];
    var _commands = /**18 member array*/;
    var _commands_len = 18;
    if( _is_command){
    } else {
        var _msg_trimmed_len = 2;
        var _command = "broadcast";
        var _command_index = 16;
        var _command_exists = true;
    }
    if( {true} && {0} < {1}){ // _command_exists conditional
        var _arg = "";
        var _arg_type = -4;
        var _asset = "";
        var _arg_len = 0;
        if( _arg_type == ezConsole_type_options){
        } else if (_arg_type == ezConsole_type_instance){
        }
        _names = console_typeahead_get_names(-4)

ezConsole_logic line 504:

function console_typeahead_get_names(-4){
    static _names = {
        script: __ezConsole_dep_get_asset_names(5)

ezConsole_dependencies line 159:

function __ezConsole_dep_get_asset_names(5){
    var _cb = script_get_name; // 803 internally
    var _ids = /**268 member array*/;
    var _ids_len = 268;
    var _names = [];
    for( /**0 through 250 work, _names is now 154 elements*/ i = 251){
        var name = "Network";
        if( {false} || {false});
        if( ({true} && ({false} || {false});
        if( ({true} && __ezConsole_dep_is_constructor(_ids[@ i]) && {false});

ezConsole_dependencies line 193:

function __ezConsole_dep_is_constructor(Network){
    try {
        var _temp = new Network();
        delete Network();
    }

This is amazing documentation of the error, thanks a lot for the fix also!

I’ll be checking into it and testing some cases around it, but it should be solved by tomorrow morning with release v1.4.0

Will let you know here when it’s released :)

The new version v1.4.0 has been published. There are some breaking changes so I recommend reading the release notes.

Thanks a lot! :)