or you can just use a character array, the locations are indicated just by the co-ordinates of the descriptions (psuedocode)
dim descriptions$(5,5,5)
for i=1 to 5
for l=1 to 5
for j=1 to 5
read description$(i,l,j)
next j
next l
next i
startposx=3
startposy=3
startposz=3
do
print "direction?"
input a$
if a$="up" and startposy<5 then inc startposy
if a$="down" and startposy>1 then dec startposy
if a$="north" and startposz<5 then inc startposz
if a$="south" and startposz>1 then dec startposz
if a$="east" and startposx<5 then inc startposx
if a$="west" and startposx>1 then dec startposx
print "you are currently located in the ",description$(startposx,startposy,startposz)
print
loop
data "hall","basement","spacious palace waiting room", "creepy tomb"................
that sort of thing can index the loacations, to prevent yourself from being able to walk into any room like you can in this example, you just add six characters to the start of each room description and then print just the right side of the description and the six characters would limit movement, just check if the player moved down, and if the 1st character was "d", that means the move is allowed, likewise, if the character was "n" then thats a solid wall and you don`t decrement the position, just print, "you can`t go that way" or "you can`t walk through walls...yet"
you would modify the code to read something like this (psuedocode again)
if a$="up" and startposy<5 and left$(description$(startposx,startposy+1,startposz),1,1)="u"
inc startposy
else
print "OUCH!...thats the ROOF!....dumbo!"
endif
you can use other characters to indicate locked doors etc and change the characters as the game progresses to indicate openings or tunnels that cave in etc, hope thats some help, cheers.
Mentor.
System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD (using icewave hd coolers ), DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800Pro 128mb.