Sorry if I ask a lot of questions, I just really find this stuff interesting and google is only somewhat helpful. Okay so …

Forum Archive Sorry if I ask a lot of questions, I just really find this stuff interesting and google is only somewhat helpful. Okay so …

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6198
    Kyle Shaffer
    Participant

      Sorry if I ask a lot of questions, I just really find this stuff interesting and google is only somewhat helpful. Okay so when you used the ToString after currentAmmo. You said that was because were using an int variable. What exactly makes that an int variable? Is it because we are using a text file that references numbers? And does that mean that totalAmmo is also an int variable? Thanks!

      #25031
      Jonathan Gonzalez
      Participant

        We used ToString because we need to “convert” the int types to a string format to be displayed. Both the currentAmmo and totalAmmo are both int types. You can also get around using “ToString” if you combine the int with some sort of text. So if I used (“Ammo is ” + currentAmmo) it wouldn’t require me to use “ToString” since it’s a combination of text and numbers.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘Sorry if I ask a lot of questions, I just really find this stuff interesting and google is only somewhat helpful. Okay so …’ is closed to new replies.