bool room_exists[MAX_X][MAX_Y][MAX_Z];
int vnum[MAX_X][MAX_Y][MAX_Z];
Have you thought for a second how much memory those two variables take
up? Asuming bool is a short int, which is 2 bytes, and int is probably
the 8byte int, (500x500x500x8) + (500x500x500x2), is the amount that
-one- map takes up. Your trying to alocate 20 per room. The int vnum
one is 1 000 000 000 bytes, which is like 1 gig of memory. And your
allocating 20 of them, -plus- the bool's. Dude... not the way to do it
;) If your going to do something like that, store things that exist,
use a sparce array, but even that might not help you. Maybe just
storing one map per area? Or just one big map for the world.
Davion