Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Decreasing my lives after death
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Velocity




PostPosted: Mon Dec 12, 2011 7:34 pm   Post subject: Decreasing my lives after death

Why don't my lives go down when the ball goes below 0?

if ball_x1 < 25 and ball_y1 < 0 then
lives -= 1
end if
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Mon Dec 12, 2011 7:57 pm   Post subject: RE:Decreasing my lives after death

It's probably something wrong with the rest of your code. Do you really want to increase the score when x1 < 25 and y1 < 0? Is this condition ever even evaluated?
programmer1337




PostPosted: Mon Dec 12, 2011 8:09 pm   Post subject: RE:Decreasing my lives after death

looks like the if statement could use tweaking, can you supply the rest of the code?
Velocity




PostPosted: Mon Dec 12, 2011 9:04 pm   Post subject: RE:Decreasing my lives after death

@ Insectoid your comment actually helped me out. thanks
@ programmer sec. lemme just finish the game
Velocity




PostPosted: Mon Dec 12, 2011 9:15 pm   Post subject: RE:Decreasing my lives after death

problem solved, thanks insectoid.
Velocity




PostPosted: Mon Dec 19, 2011 7:41 pm   Post subject: RE:Decreasing my lives after death

now i look back at this and think i cant believe i was stupid enough to ask this question.
Aange10




PostPosted: Mon Dec 19, 2011 11:26 pm   Post subject: RE:Decreasing my lives after death

Quote:

@ Insectoid your comment actually helped me out. thanks



All he said was for you to read it again lol. Those are honestly questions you should ask yourself as soon as you realize it's broken. Mr. C++
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: