.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Base (http://forums.bots-united.com/forumdisplay.php?f=45)
-   -   Bogus Message Type, Server Crashes (http://forums.bots-united.com/showthread.php?t=1400)

Spykie 17-04-2004 08:56

Bogus Message Type, Server Crashes
 
When I wake up in the morning and check my server it's showing this error:
Code:

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 22:09

Re: Bogus Message Type, Server Crashes
 
Quote:

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 14:10

Re: Bogus Message Type, Server Crashes
 
Every morning when I woke up and the server is filled with 20-32 players

Pierre-Marie Baty 19-04-2004 17:01

Re: Bogus Message Type, Server Crashes
 
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 17:09

Re: Bogus Message Type, Server Crashes
 
Hmm I don't think I've ever done something like that...

Pierre-Marie Baty 19-04-2004 17:26

Re: Bogus Message Type, Server Crashes
 
rofl, nah, obviously :D

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

Cpl. Shrike 19-04-2004 17:41

Re: Bogus Message Type, Server Crashes
 
;)

Guess i need to get me memory debugger.

Im not skilled on that yet though o_O

Spykie 19-04-2004 18:32

Re: Bogus Message Type, Server Crashes
 
lol ok guys, thanks for the hard work ;)

botman 21-04-2004 01:21

Re: Bogus Message Type, Server Crashes
 
"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...
Code:

pfnMessageBegin( MSG_ONE, gmsgTextMsg, NULL, pEntity );
Code:

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...
Code:

if (gmsgTextMsg == 0)
Code:

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 05:32

Re: Bogus Message Type, Server Crashes
 
...that's because you must have copypasted this code, botman...
I know, my [ code ] tags suck :( But the default ones have this bug, too.


All times are GMT +2. The time now is 14:01.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.