   code not working
  trying to make my own little mapping code for the screen, doesnt seem to work thought...cant find the problem! maybe you'll be able to find it:location[28][30]=2;  for(mapvoidx=1;mapvoidx>64;mapvoidx++)  {for(mapvoidy=1;mapvoidy>48;mapvoidy++){if (location[mapvoidx][mapvoidy]=2){setcolor(6);rectangle(mapvoidx*10,mapvoidy*10,mapvoidx*10+9,mapvoidy*10+9);}}  }earlier in the code:int location[64][48];any idea what could be the problem? i'm using turbo c++. there's no error it just doesnt enter what's inside the if{}.   
  Replace your greater-than operators with less-than operators. ;)edit: just a few quick suggestions:* use  or [ source][ /source] tags (no spaces) when posting code snippets* prefer pre-xxcrement unless you really need the variable's previous value* use constants instead of literal numbers. It will make your programming life alot easier.* and watch the "I-meant-equality-not-assignment bugs" [smile]   ;  should the for-loop not mean "< 64" and "< 48"   ;  weeeeeeeeeeeanyways, im not sure what errors you are getting but here are some guesses...1. you might be getting null exceptions because you havent initialized the array location. you only set locatio[28][30] = 2. the other parts are set to whatever the compiler feels like throwing in there.2. Quote:if (location[mapvoidx][mapvoidy]=2)that wants to be Quote:if (location[mapvoidx][mapvoidy]==2)let me know whatever errors you are getting if any.   ;  *cursing loudly*HOW COULD I BE SO DUMB?!!!!!!!thanks...and sorry...damn...that never happened to me before...lol   ;  Also note that array indices start with 0, not 1.   