0
Int value only decreasing once
if my code is this: health = health - 5 and my base health is 50 then however manytimes i cout "health" its still 45 why
3 odpowiedzi
+ 2
If you only perform the operation once, five will be substracted only one time. Thus, it is correct that 'health' is 45.
The Variable health = The value of health - 5
-> health = 50-5
health is 45
and will not change anymore until you want it to.
0
yes but i subtract it twice in the same code and it is stil saying that it is 45
0
can you schow us the code then?