Hi,EveryOne.
I'm poor at English.
I'm reading the book <MUD Game Program>.
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=9703
On this web, I notices maybe someone here have a source code can compile.
Could U send me a copy?It would be very helpful for me.
Sorry for my shoddy Englis
My email is 1210102@qq.com
I'm not sure about how legal it is so I won't give you a direct link. However if you Google "Ron Penton mud game source" you don't have to follow many links before you find someone has put the source up.
I think it used to be on the author's site but I think that might be down now.
I already buy that book and have a cd.
I had compile the code of simpleMUD and fixed it when compile have error.
Howeve, betterMUD have more error. It's diffcult to fix all. I just if someone had the betterMUD source code can compile through the g++ 4.4.5.
Thanks for your reply.
I am under ubuntu10.10/g++ 4.4.5
I add lots "typename" in BetterMUD's source code.
I think do it right.
I change the makefile to python2.6 which I have and use now.
Here is a error I do not know why:
database/Database.h->
template< typename entity, typename container >
class Database
{
public:
....
protected:
container m_container;
}; // end class Database
template< typename entity >
class VectorDatabase : public Database< entity, std::vector<entity> >
{
public:
typedef std::vector<entity> container;
typedef typename container::iterator iterator;
entity& get( entityid p_id )
{
if( p_id >= m_container.size() || p_id == 0 )
throw Exception( "Out of bounds error in vector database" );
if( m_container[p_id].ID() == 0 )
throw Exception( "Invalid Item in vector database" );
return m_container[p_id];
}
};
You see here is a base class Database have a member "m_container".
However, G++ give me these:
In member function ‘entity& BetterMUD::VectorDatabase<entity>::get(BetterMUD::entityid)’:
BetterMUD/accessors/../databases/Databases.h:113: error: ‘m_container’ was not declared in this scope
BetterMUD/accessors/../databases/Databases.h:116: error: ‘m_container’ was not declared in this scope
BetterMUD/accessors/../databases/Databases.h:119: error: ‘m_container’ was not declared in this scope
It seems method in VectorDatabase inhert from Database can not find the m_container member.
I am not good at C++, so I do not know how to write the delcare right in the new verson.
Do you know that?
supplementary:
I alread do "make libs".
The error apper when I "make bettermud".
final,if I "make link"
link: $(wildcard *.cpp)
$(CXX) $(CFLAGS) *.o /usr/lib/python2.6/config/libpython2.6.a $(LIBS)
I need the libpython2.6.a,but I do not have.
Should I install something else by using "apt-get"?
C++'s template is so diffcult!
Em.By the google, I had fixed these code.
Now I can run it.Ha.:)
Nick Gammon,thx~
http://www.gammon.com.au/forum/bbshowpost.php?id=9703
this page give me great help.