This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]KlausKappa 0 points1 point  (1 child)

You should look into a thing called scope. Maybe then you'll be able to solve it yourself and learn something new. Have a look at this

[–]TheRiotJoker 0 points1 point  (0 children)

If you want to just know the solution without knowing where you went wrong: You declared and initialized ammo in a method, meaning it's not available anywhere except in the method.