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.

AppGameKit Classic Chat / No error message if sprite doesn't exist or image.

Author
Message
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 5th Feb 2015 01:46
HI guys,

am not getting error messages if I used a sprite number that doesn't exist of if I loaded an image that already exist.

is it normal or something wrong with My IDE?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Feb 2015 04:08
Reloading an image that already exists shouldn't cause an error. It is just unnecessary.

Are you expecting the errors to show up in the IDE at compile time?

That won't happen. There is no way for the compiler to know whether a sprite was created for a specific number.

I had seen error messages show up when the Windows or Mac OSX versions of something were run and an attempt was made to use a non-existant sprite number.

The same error messages do NOT show up on iOS or Android devices. And this is by design, apparently. Pop-up messages on those devices don't work very well.

Cheers,
Ancient Lady
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Feb 2015 10:04
By default, most errors will pass silently if the program can continue with serious implications. For example, failing to load an image will continue and the image will be replaced by a placeholder.

SetErrorMode

Sets the error mode for the AppGameKit from ignore, report, or stop from AppGameKit commands, e.g. sprite ID doesn't exist in a command that accepts a sprite ID. Ignoring will make the AppGameKit attempt to carry on, ignoring the entire command if necessary. Reporting will make the AppGameKit report the error to an appropriate debug console and carry on. Stop will force the AppGameKit to report the error as before and then stop by throwing an exception, which must be caught or the app will terminate. In the case of tier 1 the exception is caught by the interpreter and, if debugging, displayed in the IDE.

Quidquid latine dictum sit, altum sonatur

Login to post a reply

Server time is: 2024-11-25 16:47:34
Your offset time is: 2024-11-25 16:47:34