Well, I discovered the problem =\ It appears that between testing the MOTD before it was really set up properly and testing it recently, I somehow erased the contents of motd.txt. Problem solved, I guess!
Josh On Fri, 25 Feb 2005 02:17:58 +1100, Josh Matthews <[EMAIL PROTECTED]> wrote: > I haven't checked that REG_USER_MSG() returns a positive value, but > everything there is correct. The Init() function is called along with > all the other HUD elements' Init functions. > > Josh > > On Thu, 24 Feb 2005 09:10:12 -0600, Jeffrey botman Broome > <[EMAIL PROTECTED]> wrote: > > Josh Matthews wrote: > > > I'll explain my situation. I've just begun modding HL1, I own a copy > > > of VC++.NET but can't install it due to space requirements, so I'm > > > using Dev-C++/MinGW. I am working off of botman's modified SDK 2.2 > > > source, which for one thing means that there's no VGUI included. By > > > following tutorials I've implemented a team selection menu which works > > > great. I have had less success with trying to get the MOTD to show > > > up, though. Here's the problem, I've added the CHudMOTD class back > > > in, done a DECLARE_MESSAGE(), hooked the message, copied the drawing > > > and message function from the earlier SDK, all of that. I have also > > > got the message sending code in the game dll working, I have console > > > prints telling me that the MOTD is sent just fine. But the > > > MsgFunc_MOTD() function is never reached, and neither is the Draw() > > > function. I'm at my wits end because I've gone over every messaging > > > tutorial I can find, looked through the source, and everything looks > > > correct. Any suggestions for me? I've tried not having the team menu > > > show up on spawning, but that doesn't make any difference either. > > > > Does your CHudMOTD::Init() function get called? > > > > You probably have m_MOTD as the CHud member variable for your MOTD > > window, so in CHud::Init() you should have... > > > > m_MOTD.Init(); > > > > ...in the same general area as all the other .Init()'s. I assume you > > are hooking your message in CHudMOTD::Init()... > > > > DECLARE_MESSAGE(m_MOTD, MOTD) > > > > int CHudMOTD::Init(void) > > { > > HOOK_MESSAGE(MOTD); > > return 1; > > } > > > > ...and make SURE that you've registered the message on the server side... > > > > gmsgMOTD = REG_USER_MSG( "MOTD", -1); > > > > ...and check that REG_USER_MSG returned a valid positive integer for > > gmsgMOTD and not 0. Also, IIRC, the network messages are > > case-sensitive, so make sure you don't have "motd" on the client (in the > > DECLARE_MESSAGE() and "MOTD" on the server (in the REG_USER_MSG), or > > vice-versa. > > > > -- > > Jeffrey "botman" Broome > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list archives, > > please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders