C
C#16mo ago
Austin9675

Data or int issue

I'm new to reading from files type of things i just been testing different things, i want the int lowpokemon to add a point to itself every time a pokemon has less then 100 cp but its only doing it once instead of every time it finds a low cp in the file
3 Replies
Kouhai
Kouhai16mo ago
Well, check the line where you delcare lowPokemon
Angius
Angius16mo ago
You have two lowPokemon variables One is outside of the loop, one is inside
TheRanger
TheRanger16mo ago
and it resets back to 0 everytime you iterate + the one outside the loop isnt static, so you cant access it in a static method
Want results from more Discord servers?
Add your server