Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / ERRORS must do not close the game, it must send running program to FUNCTION or to LABEL

Author
Message
Leonid
User Banned
Posted: 6th Jul 2012 15:39 Edited at: 6th Jul 2012 15:40
ERRORS must do not close the game, it must send the running program to FUNCTION or to LABEL

I will be looking stupid as programmer when my program will write to user or to gamer "Error! I'm closing!". It will be better if functions will be named Error_No_Sound or labels with the same name. My program runs out when it can not record a sound correctly, I can make a repeat to record new sound in sub-program without loosing an information stored in memory.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Jul 2012 15:49 Edited at: 6th Jul 2012 15:49
To do that you have to perform your own checks. Every command in DBP has a way of making sure it won't fail to execute. If you have to play a sound, this here could fail:



Where this would be safe:



So yeah, have fun with that.

TheComet

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 6th Jul 2012 18:05
Also you can try STYXs error trapping functions...to label your own exit errors...

GIDustin
18
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 6th Jul 2012 22:11
Also, IanM's Matrix Utility allows you do redirect to a function when a standard error occurs. You can use this to track the errors that you missed using TheComet's suggestions:

http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1Util_06_index.html
Leonid
User Banned
Posted: 6th Jul 2012 23:39 Edited at: 7th Jul 2012 01:57
Matrix1 utils 06 good!
If I will win a lottery writting a games I will give you some money after this helpful utils!
GIDustin
18
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 7th Jul 2012 05:50
I was just coming back to explain how to use it, but you appear to have figured it out.

Login to post a reply

Server time is: 2026-07-07 19:10:18
Your offset time is: 2026-07-07 19:10:18