I have a big code like this :
if(current1 ==0){inventory.current1 = 255;}
if(current2 ==0){inventory.current2 = 255;}
if(current3 ==0){inventory.current3 = 255;}
if(current4 ==0){inventory.current4 = 255;}
.
.
.
.
if(current35 == 0){inventory.current35 = 255;}
This is not my code but is something like so,
And i want to make this small with for.
for(int i=1,i<=35,i++){
if(current"i" == 0){inventory.current"i" = 255;}
}
Any solve? Thanks in advance!(sorry for my english)