PDA

View Full Version : Bogus Message Type, Server Crashes


Spykie
17-04-2004, 09:56
When I wake up in the morning and check my server it's showing this error: Tried to create a message with a bogus message type (0)

Any idea why it's doing this?


Keep up the great work!

Cpl. Shrike
17-04-2004, 23:09
Tried to create a message with a bogus message type (0)
Well i have never seen that message before. ???:(

Do you get that alot ??
Or was it a one time glitch.

Spykie
18-04-2004, 15:10
Every morning when I woke up and the server is filled with 20-32 players

Pierre-Marie Baty
19-04-2004, 18:01
I've already seen this message before...

For me it was a memory problem... there must be a leak somewhere... or an overflow... or something. Ensure that when you free() stuff you never free it twice, and all the usual checks ...

Spykie
19-04-2004, 18:09
Hmm I don't think I've ever done something like that...

Pierre-Marie Baty
19-04-2004, 18:26
rofl, nah, obviously :D

my reply was about coding, it was directed at Cpl Shrike, not you, sorry dude :)

Cpl. Shrike
19-04-2004, 18:41
;)

Guess i need to get me memory debugger.

Im not skilled on that yet though o_O

Spykie
19-04-2004, 19:32
lol ok guys, thanks for the hard work ;)

botman
21-04-2004, 02:21
"bogus message type (0)" errors are caused when you try to send a network message without registering it first. For example, if you had something like this...
pfnMessageBegin( MSG_ONE, gmsgTextMsg, NULL, pEntity );
pfnWriteByte( msg_dest );
pfnWriteString( msg_name );
pfnMessageEnd();
...you can get that error if you never registered 'gmsgTextMsg' using REG_USER_MSG.

You should have the code be something like this instead...
if (gmsgTextMsg == 0)
gmsgTextMsg = REG_USER_MSG( "TextMsg", -1 );

pfnMessageBegin( MSG_ONE, gmsgTextMsg, NULL, pEntity );
pfnWriteByte( msg_dest );
pfnWriteString( msg_name );
pfnMessageEnd();
It should be pretty simple to search your bot code for "MESSAGE_BEGIN" or "pfnMessageBegin" and find all the places where you're not checking the message ID for == 0.

EDIT: I have NO idea why it's putting the "Courier New" crap in there.

botman

Pierre-Marie Baty
21-04-2004, 06:32
...that's because you must have copypasted this code, botman...
I know, my [ code ] tags suck :( But the default ones have this bug, too.