Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

the gms1 version has a mistake in it

instance_destroy() has to be called as a function with no arguments

so id change it to this

 if(myTextbox != noone){
    with myTextbox{
        instance_destroy()};
        myTextbox = noone;

(1 edit)

Actually this isn't a mistake; the function has an optional argument. Its default is just to destroy the calling instance, but you can destroy a specific instance other than the calling one via the optional argument. This is according to the GameMaker documentation on the function.

As far as I know this has never caused me any problems -- have you encountered some errors?

it flagged as an error the second i opened it and it wouldnt run until i removed it

wrong number of arguments

Oh, how weird!

not weird to me, in all the versions of game maker i had all of them had instance_destroy() with an error thrown if you put something in it

if the code is instance_destroy(a), doesn't a : 

with(a) instance_destroy(); 

be enough to make things right ??

thats what i changed it to, i was just letting the maker know in case someone wanting to use this wasnt good enough with gml to know that

Cheers! I've had another commenter run into the same issue, so I'll go ahead and change the code for the new version. (I can't believe I've never run into the problem myself!)

Thanks for letting me know & discussing it with me :)