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 / AGK 1085 beta - DeleteAllSprites() issue - leaves sprite images on screen

Author
Message
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 5th Jan 2013 18:46
I've run into what looks like a bug:
If I use the DeleteAllSprites() command, the sprites are deleted, but stay on screen. No syncing or use of clearscreen() gets rid of them.
If I use DeleteSprite() and iterate through all sprites then it works just fine.
I also ran into a bump with using GetSpriteExists() in a for-next loop. It causes a stack overflow in my compiler for a reason I cannot determine. Bonus points to whoever can tell me what I'm doing wrong.

Compiled program and files (Windows) in the attached RAR.
Code below.
Thanks!!!



Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jan 2013 00:36
Thanks for the example. I get the same results and I've fixed DeleteAllSprites so it clears all the memory for the sprite, I would actually expect it to crash at some point in its current state.

The bug with the for loop is that adding i to the string as an integer seems to crash the compiler. Adding it as str(i) seems to work. Hopefully we can fix this in the upcoming compiler work.
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 8th Jan 2013 04:19
Ah!! Thank you!!
I was going absolutely nuts with the for loop as I ran into a similar problem in another program. I though it was because I wasn't declaring or using the variables before the print statement (in the program I'm working on not the one above), but hadn't tested yet. Then I read this and adding str() works just fine. Not a bad work around and logically makes sense.

Glad I could be a help with DeleteAllSprites() and glad to hear you've already fixed it Can't wait for the next update!

Nexus 7 (Jelly Bean 4.1.2) -- HTC Droid Incredible 2 (Gingerbread 2.3.?) -- Motorola Droid X (Gingerbread 2.3.4)
Willing to test for you!

Login to post a reply

Server time is: 2024-11-24 05:35:39
Your offset time is: 2024-11-24 05:35:39