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 / Function Trouble, My head hurts..blah

Author
Message
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 1st Aug 2014 04:12


I'm wracking my brain trying to figure out why this won't work. Everything is self contained, so no need for globals...My IF statements make sense in my head, maybe I missed something.

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 1st Aug 2014 06:03 Edited at: 1st Aug 2014 06:12
im wondering about the lines you have here:



and the


to me these do not look correct so fix those first....


try something like this:


it may be ok with your else command but its kinda weird reading it that way

looking at your code closer...id just write it like this:




try something like that and see what happens.

a good way to check for bugs in your code is to throw a break in there just to see how far the computer is executing... maybe its not even getting into the second round of ifs...

an example i call code stepping is to just throw an end statement within the code to see if the application is even looking at that code or not. If your app closes then remove the end statement and goto the next if statement and test it out. sometimes you find an error where its not even processing that chunk of code and it really helps narrow things down to the exact errors you have.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 1st Aug 2014 06:15 Edited at: 1st Aug 2014 06:20
Well that's the thing, I use to have a returnvalue after the else commands. I'd test it and check for the max returnvalue. I'll try your edit and see what happens.

Lol...worked.

I think I was either confusing myself or the program into checking for =0 and just ending the function before it had a chance to update the sprite...

Too tired to really look at it, lol.

Thanks again!

SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 1st Aug 2014 15:16
hehe no problem! glad to here it worked.

Login to post a reply

Server time is: 2024-03-29 14:11:57
Your offset time is: 2024-03-29 14:11:57