• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

iOS Catching errors / Error handling

Josepho

Member
Hi I would like to know if there is any way to catch errors in game maker

I know this exists
https://yellowafterlife.itch.io/gamemaker-catch-error

but it looks like its only for windows and i need a multiplatform solution if not, yoyo should work on it as its a very important feature in code languages.

Many thanks :)

Pd: Sorry if this is an already created topic i was not able to find it due to the key words -_- (errors, try, catch..)
 

TsukaYuriko

☄️
Forum Staff
Moderator
To add to the above: A lot of functions return whether they succeeded. By performing checks against these return values to ensure that what you think should work actually did work, you can sort of implement error handling on a very fundamental level.
 

Speederman

Member
I've found a way of doing this on Android: https://forum.yoyogames.com/index.php?threads/error-handling-and-capture.59666/#post-396016

However, iOS Supporting Files are compiled, so there's not an easy way of modifying them... I think I've found the ShowMessage function in 'C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-<your-version>\ios\TemplateProject\${YYXCodeProjName}\Supporting Files\libyoyo_interpreted.a', but it should be decompiled, modified and compiled again to get it working. Maybe this tool could help with this, but I haven't tried it...
 

NightFrost

Member
Didn't some programming language's userbase recently rebel against adding a try-catch feature? And it ended up being dropped? I recall one of the arguments thrown around was that "try() is a solution searching for a problem."
 
Top