Computer Science Canada pic rotate help |
Author: | shoobyman [ Thu Dec 07, 2006 10:09 am ] | ||
Post subject: | pic rotate help | ||
when i run it, if i press the arrow key (other than the pic looking bad), it gives me an error after a few seconds it gives me this error "illegal picID number "0" (probable cause picture was not successfully created)" anyone know how to fix it? |
Author: | NikG [ Thu Dec 07, 2006 3:44 pm ] | ||||
Post subject: | Re: pic rotate help | ||||
shoobyman wrote:
Your code is kinda all-over-the-place, and I'm almost positive that's why you're getting the error. Here's a cleaner (and probably less error prone) version:
|
Author: | NikG [ Thu Dec 07, 2006 3:47 pm ] |
Post subject: | |
Actually, now I know why you're gettin the error. It's because of your else clause in the if statement. Remove it! You shouldn't get the error with my code anymore, but it's not proper. And it doesn't make sense to keep resetting the angle to 0 if there's no input. |
Author: | shoobyman [ Thu Dec 07, 2006 5:51 pm ] |
Post subject: | |
thanks, everything works (and I fixed the ungly picture problem) |