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

GMEdit doesn’t auto-complete arguments in this case because that wouldn’t work in GML - should you do

function TileObject(_sprite, _object, _blocked) constructor
{
    sprite = _sprite;
    blocked = _blocked;
    object = _object;
    Copy = function()
    {
        return new TileObject(sprite, object, blocked);
    }
    static Add = function(_sprite, _object, _blocked)
    {
        var _instance = new TileObject(_sprite, _object, _blocked);
        array_push(global.tileObjects, _instance);    
    }
}
function scr_hello() {
	var o = TileObject.Add(0, 0, 0);
	show_debug_message(o);
}

you would get

Variable <unknown_object>.Add(100013, -2147483648) not set before reading it.
 at gml_Script_scr_hello (line 17) - 	var o = TileObject.Add(0, 0, 0);

because you cannot access static properties through a constructor itself - GML’s static is like C++ static, not like C#’s static.

Should you need to highlight arguments in code that wouldn’t work at runtime, you can use @hint