>What am i doing wrong/???
You're asking a debugging question without having tried to debug. Do you think we can look at any piece of code and know what's wrong? No, we have to debug. That's about 90% of what programming is. You run the program. You run the program with print statements tossed in so that you know where you are at any given point. You run the program and print the contents of your variables at every step. You run the program with a debugger. You pray. You scream. You bash your head against a wall. But you never ever EVER post just the code and an "it's not working" message on a message board full of real programmers.
We put the same effort into helping you as you put into helping yourself. If you don't try, neither do we.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>i hope this simplifies it alittle better.
You don't need to simplify. I know what you're problem is and I know what's causing it. However, you've done nothing to show that you've made any attempt to figure it out on your own. Therefore, it's only fair that I do nothing to show you what's wrong.
As I said, debugging is 90% of programming, and if I just give you the answer without making you go out and learn how to debug, I'm doing you a great disservice.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
In regard to your original code: Could you please explain why it is supposed to work correctly?
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
Something else you didn't do for a few seconds was look at the post dates.
Last post (before you) was 16th Feb 2006
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Hey UrClothesRBlue I think mina1984 has left us and gone to Mars so why bother any further...
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661