Advertisement

Debugging

Started by August 05, 2000 07:57 PM
12 comments, last by McChuie 24 years, 5 months ago
Umm, forget about the error messages, I got rid of the defalt and it works fine, but when ever i attack or get attacked it doesnt give me a random number, what is wrong with my code??

Edited by - McChuie on August 6, 2000 4:54:41 PM
Hmmmm... could you be a bit more specific?

If you mean the "random" numbers are the same every time you run it, you can fix that by putting this line of code as the first line of main():

srand((unsigned) time(NULL));

(Make sure to include < time.h >.)
Advertisement
I mean it alwase says 0
Ya!! I did it!! I posted to complete code up above, Thanks everyone!!!

Edited by - McChuie on August 6, 2000 10:53:39 PM

This topic is closed to new replies.

Advertisement