itch.io Spring Selects Series A
On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Gun Princess 2

Save your sister... and a bunch of bats! · By Yal

I've got an error on your source code,please help me fix it

A topic by Suspended Account created Jan 14, 2021 Views: 244 Replies: 3
Viewing posts 1 to 2
Show post...

Hello I have bought your pretty source code and now testing it.

After defeating the first boss(the stone guy who spawn bats) and come back to previous room i got this error:

"ERROR in action number 1 of Alarm Event for alarm 0 for obj_autocutscene:

instance_deactive_object argument 1 incorrect type(undefined) expecting a Number(ayygI32) at gml Script csc_q"

Please help me fix this. I'm using GMS 2.2

Developer (1 edit)

I looked into this, the line that causes the issue is line 24 of ev_batville_veggiscene:

gml_Script_ev_batville_veggiescene (line 24) -        csc_q(prompt_add_alt("Like chicken, I guess...",0010))

The underlying problem is that csc_q tries to deactivate the object that is returned, but prompt_add_alt doesn't return an object. I think modifying it like this is all you need to fix the issue:


(in previous versions of Game Maker scripts would return 0 if no return value was specified, which is a valid ID for instance_deactivate functions even if it's never actually used as an instance ID)

Show post...

Thanks so much. It works perfect now. I hope to see more wonderful engine and source code from you, you're really a master of Game Maker!

Developer

Glad you could get it working!

I'm probably not going to release new engines in the near future, I've basically done everything at this point :P But we'll see what happens once 3D support gets better...