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 / sprite delete

Author
Message
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Dec 2012 14:02
what happens if i do a deletesprite that does not exist?

does AppGameKit handle that ok or will i cause corruption over time doing it over and over again?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Dec 2012 14:24
Normally I think it is just ignored in Tier 1. Is there some reason you can't check first?



this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Dec 2012 15:49
In Tier 2 it behaves differently on different platforms. Windows is okay, but iOS and Android throw an exception and abort.

Put the code baxslash showed in a function and pass it the id in question. Then always use the function to delete a sprite and you'll never have an issue with that.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Dec 2012 22:11
thanks

Login to post a reply

Server time is: 2024-11-24 04:01:04
Your offset time is: 2024-11-24 04:01:04