Any1, who are using this map thing, succeeded in making a frame around the map? If you did, please help me, I'm trying and trying and all I get is some corrupt map (view this map in a fixed-width font): Map of CircleMUD --------------------------------------------------| |X T| | | | | | | | | | N | | | | | | | | | | | | G | | | | | | | | | | | | | | | | -------------------------------------------------- - As you can see, right line is screwed up. Here is the code that I'm using: [...] for (x = 0; x <= MAP_X; x++) { for (y = 0; y <= MAP_Y; y++) { if (x == 0 && y >= 1 && y < 51) { map[x][y] = '-'; } else if (x == 21 && y >= 1 && y < 51) { map[x][y] = '-'; } else if (y == 0 && x >= 1 && x < 21) { map[x][y] = '|'; } else { map[x][y] = ' '; } for (i = 0; i <= top_of_zone_table; i++) { if (x == zone_table[i].xpos && y == zone_table[i].ypos) { if (GET_XPOS(ch) == zone_table[i].xpos && GET_YPOS(ch) == zone_table[i].ypos) map[x][y] = 'X'; else map[x][y] = zone_table[i].sy; } } } } } ACMD(do_map) { int x, y, slen = 0; *buf='\0'; draw_map(ch); for (x = 0; x <= MAP_X; x++) { for (y = 0; y <= MAP_Y; y++) { slen += sprintf(buf + slen, "%c", map[x][y]); if (y == MAP_Y) slen += sprintf(buf + slen, "\r\n"); } } page_string(ch->desc, buf, 1); } ============= Regards Måns Sewerin -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT