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.

Dark GDK / What does dbSpriteX return for a nonesxistent sprite?

Author
Message
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 20th Nov 2011 20:58 Edited at: 20th Nov 2011 20:58
If I use the command dbSpriteX(1) and the sprite with and ID '1' doesn't exist yet what is the returned value? I have noticed that the returned value seems to be smaller than 0. Is this always the case or only mostly?
Thanks in advance!

I just love the smell of code in the morning...
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th Nov 2011 22:27
You should probably test if it exists first anyway using dbSpriteExists( spriteID )

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 20th Nov 2011 22:56
Right.. that would work too
Thanks!

I just love the smell of code in the morning...

Login to post a reply

Server time is: 2024-11-19 06:52:28
Your offset time is: 2024-11-19 06:52:28