9 years ago.

using the variable to put into the function

int main() { while(1) { k = screen();

int cells[84][48]; for (int i=0; i<84; i++) { for(int j=0; j<48; j++) { n = checking(i,j,k); h = conditions(k,n); lcd.refresh(); cells[i][j]=h; } }

trying to subs the value of hz into h so that it can be stored into cells array

int conditions(int kz, int sz) { if (kz==0) { int hz; if (sz==3) { hz=1; } else if (sz!=3) {

hz=0; } return hz; } else if (kz==1) { int hz; if(sz<2) { hz=0; } else if(sz>3) { hz=0; } else if(sz==2||sz==3) { hz=1; } return hz; }

}

1 Answer

9 years ago.

Hi Christiano,

Could you explain your problem? Just posting code doesn't explain what you wish to do and what doesn't work.

Thanks

Maxim

And please put <<code>> before the code and <</code>> after it so that the formatting doesn't mess up

posted by Andy A 23 Apr 2015