I have a copy of the book, and I am trying to compile simplemud. I made the typename changes listed in the above post. However, I had to add an additional typename:
// internal iterator
typedef std::vector<datatype>::iterator iterator;
to
// internal iterator
typedef typename std::vector<datatype>::iterator iterator;
to get it to compile, although it does compile with warnings.
Simplemud runs fine up until the gameloop::PerformRegen() is called which calls the following routine in enemydatabase.cpp
void EnemyDatabase::Create( entityid p_template, room p_room )
{
entityid id = FindOpenID();
Enemy& e = m_map[id];
e.ID() = id;
e.LoadTemplate( p_template );
e.CurrentRoom() = p_room;
p_room->AddEnemy( id );
}
When the first line of Create() tries to set the value of id by calling FindOpenID() the server crashes. According to c++.net 2008 it appears to be trying to set the value of id to 3435973836 and it finally says something about map/set being undereferanceable.
entityid is defined as an unsigned int. So, I'm guessing that the variable simply isn't large enough for the value trying to be assigned to it. I'm still not very fluent in c++ but that's my guess.
If anyone can help, I would appreciate it.
I've been trying to stick to simplemud since I haven't even begun learning python yet.
On a side note: I did find a copy of bettermud that someone got to compile at...
https://briandamaged.org/blog/?p=412