Ok, I've gotten myself into some action here, and is developing
a Virtual Map. But when I compile, the following problem shows:
act.informative.c: In function `look_at_vmap_room':
act.informative.c:872: storage size of `vmap1' isn't constant
act.informative.c:889: array subscript is not an integer
act.informative.c:892: warning: format argument is not a pointer (arg 4)
act.informative.c:892: warning: format argument is not a pointer (arg 5)
act.informative.c:892: warning: format argument is not a pointer (arg 6)
act.informative.c:892: warning: format argument is not a pointer (arg 7)
act.informative.c:892: warning: format argument is not a pointer (arg 8)
act.informative.c:894: warning: format argument is not a pointer (arg 4)
act.informative.c:894: warning: format argument is not a pointer (arg 5)
act.informative.c:894: warning: format argument is not a pointer (arg 6)
act.informative.c:894: warning: format argument is not a pointer (arg 7)
act.informative.c:894: warning: format argument is not a pointer (arg 8)
act.informative.c:896: warning: format argument is not a pointer (arg 4)
act.informative.c:896: warning: format argument is not a pointer (arg 5)
act.informative.c:896: warning: format argument is not a pointer (arg 6)
act.informative.c:896: warning: format argument is not a pointer (arg 7)
act.informative.c:898: warning: format argument is not a pointer (arg 4)
act.informative.c:898: warning: format argument is not a pointer (arg 5)
act.informative.c:898: warning: format argument is not a pointer (arg 6)
act.informative.c:898: warning: format argument is not a pointer (arg 7)
act.informative.c:898: warning: format argument is not a pointer (arg 8)
act.informative.c:900: warning: format argument is not a pointer (arg 4)
act.informative.c:900: warning: format argument is not a pointer (arg 5)
act.informative.c:900: warning: format argument is not a pointer (arg 6)
act.informative.c:900: warning: format argument is not a pointer (arg 7)
act.informative.c:900: warning: format argument is not a pointer (arg 8)
act.informative.c:900: warning: too few arguments for format
act.informative.c:903: warning: format argument is not a pointer (arg 4)
act.informative.c:905: warning: format argument is not a pointer (arg 4)
act.informative.c:907: warning: format argument is not a pointer (arg 4)
act.informative.c:909: warning: format argument is not a pointer (arg 4)
act.informative.c:911: warning: format argument is not a pointer (arg 4)
act.informative.c:913: warning: format argument is not a pointer (arg 4)
act.informative.c:915: warning: format argument is not a pointer (arg 4)
act.informative.c:917: warning: format argument is not a pointer (arg 4)
act.informative.c:919: warning: format argument is not a pointer (arg 4)
act.informative.c:921: warning: format argument is not a pointer (arg 4)
The vmap1 stuff is just a normal int vmap1[28][45] = {
Then, I've written up a grid of numbers...
example. {0,0,0,0,0,1,1,0,0,0,2,2,2,2,2
and so on......
I have no idea what can be wrong. The look_at_vmap_room is the following:
void look_at_vmap_room(struct char_data * ch)
{
int x, y;
extern int vmap1[(int)GET_Y(ch)][(int)GET_X(ch)];
extern char vmap_terrain_name[];
extern char symbol[];
extern char field_desc;
extern char forest_desc;
extern char hill_desc;
extern char mountain_desc;
extern char water_desc;
extern char flight_desc;
extern char desert_desc;
extern char road_desc;
extern char city_desc;
extern char village_desc;
x = GET_X(ch);
y = GET_Y(ch);
sprintf(buf, "&c%s&n\r\n\r\n", vmap_terrain_name[vmap1]);
sprintf(buf, "%s%s%s%s%s%s\r\n", buf, symbol[vmap1[(int)y+2][(int)x-2]],
symbol[vmap1[(int)y+2][(int)x-1]],
symbol[vmap1[(int)y+2][(int)x]],
symbol[vmap1[(int)y+2][(int)x+1]], symbol[vmap1[(int)y+2][(int)x+2]]);
sprintf(buf, "%s%s%s%s%s%s\r\n", buf, symbol[vmap1[(int)y+1][(int)x-2]],
symbol[vmap1[(int)y+1][(int)x-1]],
symbol[vmap1[(int)y+1][(int)x]],
symbol[vmap1[(int)y+1][(int)x+1]], symbol[vmap1[(int)y+1][(int)x+2]]);
sprintf(buf, "%s%s%s*%s%s\r\n", buf, symbol[vmap1[(int)y][(int)x-2]],
symbol[vmap1[(int)y][(int)x-1]],
symbol[vmap1[(int)y][(int)x+1]],
symbol[vmap1[(int)y][(int)x+2]]);
sprintf(buf, "%s%s%s%s%s%s\r\n", buf, symbol[vmap1[(int)y-1][(int)x-2]],
symbol[vmap1[(int)y-1][(int)x-1]],
symbol[vmap1[(int)y-1][(int)x]],
symbol[vmap1[(int)y-1][(int)x+1]], symbol[vmap1[(int)y-1][(int)x+2]]);
sprintf(buf, "%s%s%s%s%s%s%s\r\n", buf,
symbol[vmap1[(int)y-2][(int)x-2]], symbol[vmap1[(int)y-2][(int)x-1]],
symbol[vmap1[(int)y-2][(int)x]],
symbol[vmap1[(int)y-2][(int)x+1]], symbol[vmap1[(int)y-2][(int)x+2]]);
if (vmap1[y][x] == 0)
sprintf(buf, "%s%s\r\n", buf, field_desc);
else if (vmap1[y][x] == 1)
sprintf(buf, "%s%s\r\n", buf, forest_desc);
else if (vmap1[y][x] == 2)
sprintf(buf, "%s%s\r\n", buf, hill_desc);
else if (vmap1[y][x] == 3)
sprintf(buf, "%s%s\r\n", buf, mountain_desc);
else if (vmap1[y][x] == 4)
sprintf(buf, "%s%s\r\n", buf, water_desc);
else if (vmap1[y][x] == 5)
sprintf(buf, "%s%s\r\n", buf, flight_desc);
else if (vmap1[y][x] == 6)
sprintf(buf, "%s%s\r\n", buf, desert_desc);
else if (vmap1[y][x] == 7)
sprintf(buf, "%s%s\r\n", buf, road_desc);
else if (vmap1[y][x] == 8)
sprintf(buf, "%s%s\r\n", buf, city_desc);
else if (vmap1[y][x] == 9)
sprintf(buf, "%s%s\r\n", buf, village_desc);
send_to_char(buf, ch);
}
See anything errant in there?
>Christoffer
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST