SOLVED - Not restarting game or making a max of 1000

So I’m having problems with Number Wizard. I put in some of my own text for words that it says but other than that I followed everything to a T and even went back and watched previous videos to see if I messed up. No luck. This is the code that I used, I can’t seem to figure out why its not working.

                                 **Warning**
                             **Harsh language**

Unity 4.6.9f1
MonoDevelop 4.0.1

1 Like

Evening,

Just looking through the reason why its not showing the player the Max of 1000 instead of 1001

have a look at this code, ive just updated it

void StartGame () {
max = 1000;
min = 1;
guess = 500;

  //max = max + 1;  // move this to after the print statements
  print ("========================");
  print ("Welcome to Number Nagger");
  print ("Pick a number you ****. Don't be a **** and tell me!");
  print ("The highest number you can pick is " + max);
  print ("The lowest number you can pick is "	+ min);	
  print ("Is the number higher or lower than " + guess);
  print ("Up = higher, dowm = lower, return = EQUAL!");
  // so pop it here instead here, so the originals are shown to player, but this is then indexed up
  // to help gameplay rounding
  max = max + 1;

}

as far as the game not restarting, seems to work OK for me, just out of curiosity, in the console have you the collapse button pressed in? so with collapse on it will just group all similar outputs and show a number next to them to indicate how many times they are being displayed.
When collapse is not active, this will show console logs sequentially.

one way to test to see if you are getting the game resetting, just before you press the Enter button, press clear on the console, then press enter, should show the expected outcome.

see how you get on.

2 Likes

Thank you so much! Works perfectly!

And yeah I did have collapse on lol

2 Likes

Good stuff :slight_smile:

If you can mark the thread as solved please Jonathan just for the records.

Privacy & Terms