This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Morning everyone :-) I would like to get a list of usermessages within a
server plugin (on the fly). I am accessing the server DLL exports through
the interface factory, and then trying to iterate through them using
IServerGameDLL::GetUserMessageInfo.
//This is called from ::Load(), after serverGameDLL is setup.
void InitUserMessages( )
{
DevMsg("Begin InitUserMessages( )\n");
char szName[256];
int iSize = 0;
int i = 0;
while(serverGameDLL->GetUserMessageInfo(i,szName,256,iSize))
{
DevMsg("Registering %s\n",szName);
usermessages.Register(szName,iSize);
i++;
}
}
This is working great except I have not been able to find a way to get the
max number of usermessages! What happens is I get to the end of the list
and instead of GetUserMessageInfo returning false, it goes through to
CUserMessages::GetUserMessageName, then dies with an "out of range" error
:-(.
Any solutions? Possible bug with IsValidIndex?
Scott
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders