PDA

View Full Version : Alice medeval math


Kianna Velene
07-05-2009, 11:23 AM
Hi. I'm having a problem here getting my world to work. It's supposed to ask you for a question and the animal suppose to do a method when he reacts. I can get him to react when you answer the question correctly, but when you get it wrong the program doesn't respond. I'm not really sure what the problem is here. I asked a guy a couple of days ago what he though might've been wrong, but I forgot what he all said, but I took down a couple of mental notes from him and applied them to my project. I'm using 2.0

Can anyone here give some assistance?

Kianna Velene
07-05-2009, 02:54 PM
any help?

DrJim
07-05-2009, 03:58 PM
Your basic problem is that you need to "nest" your if/else statements - see attached. The way you had them, you never got to the tests for 2 and 3.

There is also a bug in the random number generator which shows up occasionally - namely returning an "integer" doesn't always work. The fix for that is to just multiply the generated random number by 1. I also changed the limits for the random number generator and added that in the attached.

Kianna Velene
07-08-2009, 11:23 AM
I appreciate the help. :)