Err. Your code is kinda screwy. Ok, your running the first loop as long as temp_x != MAX_X, and a nested loop that goes till temp_y != MAX_X+1. Then, within the context of the nested while statement, you only increase temp_x when temp_y == MAX_Y. So lets say MAX_X is less than MAX_Y by more than 2. So the nested while statement cuts off one short of MAX_Y, so the call to increase the temp_x variable by one, never comes. Infinate loop. I... think I understand what your trying to do, by using MAX_X+1, and that is, make your map square. If such is the case, you want to fill in the left overs with spaces. Or, rather than that, it seems you already have a map built, why not use that instead? Just start with the center point as ch->x/ch->y, set the size, say, 5, so you start at, (ch->x-5, ch->y-5), and end at (ch->x+5, ch->y+5). Make sure to have checks so that ch->*-5 does not go less than 0, and ch->*+5 does not exceed MAX_*. If either do, fill in it with blank spaces untill it reaches 0<=x<=MAX_X and 0<=y<=MAX_Y. Sorry if some of this gets confusing (It shouldn't! Its basic grade 10 cordinate stuff... thats graphing right? :P). If you want more help on the algorithms and such, just like... uhh, contact me when I didn't just get off a 12 hour shift. Hard to think.
Davion

