Thread: text game
View Single Post
  #2 (permalink)  
Old October 30th, 2006, 08:57 AM
Geo121 Geo121 is offline
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Wow . . .

I am really impressed with this idea.

I never thought of having a map like scenario like this.

If you don't mind I think I might use it sometime.

Anyways I found your problem it's very small but it is serious

okay are you ready?

the function actiondesc() in your class thisroom is a good idea except because it is a class you can't declare multiple abstract functions for the values of the dungeon array

UNDERSTAND??

you had

dungeon[5].actiondesc(){
    cout <<"You sniff the fould air" <<endl;
}

now there are two problems with these lines of code

first you are trying to declare a function inside of a function that is just bad programming practice

second you can't create seperately declared functions for each value of the array

instead you should declare the function outside of the main function and it should be similar if not exactly like this

 ~ Geo
Reply With Quote