How do you turn a string variable to a int?
I searched it up on youtube and it is showing me what I already know. I know how to turn input into an int, just not a variable. I want to add points to my game, but I can not add them up, it just stays at zero, do you know how to help me??
this is what I do
points = 0
blah blah a bunch of code
points + 1
I thought it was right, but it was not, and I know what is wrong, I know what to do (That is turn "points" into an int) but I do not know how to do it... :( Can anyone help me??? Please?
you never assigned the variable points remember? You have to assign the variable, 1+points just calculates the expression, but doesn't do anything with it!
points += 1
points = points + 1