[hlcoders] message of bogus type
For 2 days I've been playing around with a message system to replace the death message and gun/ammo pickup messages in my mod. I think I got it set up, with messages queuing to be displayed and such, but one problem has arisen... The game crashes when I make a message for it. I mean the server-client messages. I have dealt with this system twice before for radar and a timer but this one defies me. I have the message registered gmsgPerfectDarkMessage = REG_USER_MSG(PerfectDarkMessage, -1); i have an extern of it in the gamerules so I can call it there, i have it declared as a global int in player.cpp I have everything my old messages have. Then I go to trigger the message. 3 messages so I can test the queuing out MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(Dont fly strongbad); MESSAGE_END(); MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(I worry about you); MESSAGE_END(); MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(i can see the strings); MESSAGE_END(); It then, because it cares, tells me fatal eror tried to create a message with bogus message type (0) Yeah, thanks HL, I Wubb J00 too. This only occures when i fire off a message, because i tired commenting the 'dont fly strongbad' stuff. So, any ideas on why I am createing a message with a bogus message type? -- ** Draco Coder for Perfect Dark http://perfectdark.game-mod.net ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] message of bogus type
Your message name is longer than 11 characters. Because of the way user mesages are stored in the engine, message names are limited to 11 chars plus the nul terminator. If you try to create a message longer than that, then you'll trash the next usermessage or message handler pointers. -- Philip Searle Draco wrote: For 2 days I've been playing around with a message system to replace the death message and gun/ammo pickup messages in my mod. I think I got it set up, with messages queuing to be displayed and such, but one problem has arisen... The game crashes when I make a message for it. I mean the server-client messages. I have dealt with this system twice before for radar and a timer but this one defies me. I have the message registered gmsgPerfectDarkMessage = REG_USER_MSG(PerfectDarkMessage, -1); i have an extern of it in the gamerules so I can call it there, i have it declared as a global int in player.cpp I have everything my old messages have. Then I go to trigger the message. 3 messages so I can test the queuing out MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(Dont fly strongbad); MESSAGE_END(); MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(I worry about you); MESSAGE_END(); MESSAGE_BEGIN(MSG_ALL, gmsgPerfectDarkMessage); WRITE_STRING(i can see the strings); MESSAGE_END(); It then, because it cares, tells me fatal eror tried to create a message with bogus message type (0) Yeah, thanks HL, I Wubb J00 too. This only occures when i fire off a message, because i tired commenting the 'dont fly strongbad' stuff. So, any ideas on why I am createing a message with a bogus message type? -- ** Draco Coder for Perfect Dark http://perfectdark.game-mod.net ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] message of bogus type
Draco wrote: I have the message registered gmsgPerfectDarkMessage = REG_USER_MSG(PerfectDarkMessage, -1); The name of the message (PerfectDarkMessage) is probably too long. There was something like a 12 character limitation in HL1. Try a shorter one, and see if that fixes it. Rockefeller ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] message of bogus type
Draco wrote: For 2 days I've been playing around with a message system to replace the death message and gun/ammo pickup messages in my mod. I think I got it set up, with messages queuing to be displayed and such, but one problem has arisen... The game crashes when I make a message for it. I mean the server-client messages. I have dealt with this system twice before for radar and a timer but this one defies me. I have the message registered gmsgPerfectDarkMessage = REG_USER_MSG(PerfectDarkMessage, -1); If I remember correctly, REG_USER_MSG messages can only be 12 characters long. Change this... REG_USER_MSG(PerfectDarkMessage, -1); ...to this... REG_USER_MSG(PDMsg, -1); ...and it will probably work fine (don't forget to change the client to match, and they ARE case-sensitive). -- Jeffrey botman Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] message of bogus type
Thanks, now it crashes for entirely different reasons, I should be able to fix it :D whats the message name limit for HL2? ** Draco Coder for Perfect Dark http://perfectdark.game-mod.net ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] message of bogus type
On Thu, 20 Jan 2005 13:25:26 +1000, Draco [EMAIL PROTECTED] wrote: Thanks, now it crashes for entirely different reasons, I should be able to fix it :D whats the message name limit for HL2? Ummm, probably 13 characters, or maybe they've gone all out and made it 14 characters! ;) Jeffrey botman Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders