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 / CreateParticle problem

Author
Message
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 3rd Oct 2011 16:45 Edited at: 3rd Oct 2011 16:47
I have this just before my main loop.



And on keypress I do this.



This is my createExplosionOne function.



And inside my main loop I have this.



I get this error:


iOS Apps from Trisect Development.
Click here.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 3rd Oct 2011 16:52
If I replace ExplosionForBricksOne with 1 in my function it works okay.

iOS Apps from Trisect Development.
Click here.
Bursar
16
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 3rd Oct 2011 18:18
Try putting GLOBAL in front of your variable declarations. I suspect that your function is creating new local variables.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 3rd Oct 2011 18:21 Edited at: 3rd Oct 2011 18:21
I think it's because you are calling a function and the variable needs to be global for the function to see it. Try declaring it as global, see if that works.

EDIT: Damn, Bursar, I turn around for 2 minutes and you ninja me!

Bursar
16
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 3rd Oct 2011 18:37
LOL. It's been a while
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 3rd Oct 2011 20:32
Yes thats it...

Thanks

iOS Apps from Trisect Development.
Click here.

Login to post a reply

Server time is: 2024-11-22 03:19:03
Your offset time is: 2024-11-22 03:19:03