Re: [hlcoders] Message Problems
Sorry about the too late answer, but I was away from my computer for 3 days :( In my code, I've this : if ( gmsgTracesPas ) { MESSAGE_BEGIN ( MSG_ALL, gmsgTracesPas ); . MESSAGE_END(); } How could I be more safe ?? Thx. - Cortex : mapper & coder www.hlalbator.fr.st - Original Message - From: Leon Hartwig To: [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 10:55 AM Subject: RE: [hlcoders] Message Problems 'PF_MessageEnd_I: Unknown User Msg' error messages are on the server side, not the client. Either you are sending this message before the REG_USER_MSG() for this message has been executed, or you are sending messages before the engine is ready to send any user messages. When the server first starts up a map, it runs like 10-20 frames or something to let everything settle in. But during this time, there are some things the engine isn't ready to do yet; sending messages is one of them. Giving the server 2 seconds or so before you execute anything that's going to be sending messages should solve the problem (if that is indeed what is causing your problem). ___ 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
RE: [hlcoders] Message Problems
'PF_MessageEnd_I: Unknown User Msg' error messages are on the server side, not the client. Either you are sending this message before the REG_USER_MSG() for this message has been executed, or you are sending messages before the engine is ready to send any user messages. When the server first starts up a map, it runs like 10-20 frames or something to let everything settle in. But during this time, there are some things the engine isn't ready to do yet; sending messages is one of them. Giving the server 2 seconds or so before you execute anything that's going to be sending messages should solve the problem (if that is indeed what is causing your problem). ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Message Problems
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, I'm having the SAME error message... I spent a week trying to get it to work, but in vain... I really don't know what happens :( Sometimes, I get this message with the HUD lammo message... From that, the HUD isn't updated correctly... very very weird I get this damn error message when I send some Monster datas (pMonter->pev->...) using the message :( If someone at Valve could explain what is this error message or in which case it's displayed by the engine, I'd love him :) - Cortex : mapper & coder www.hlalbator.fr.st - Original Message - From: Tom To: [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 12:09 AM Subject: Re: [hlcoders] Message Problems it draws the hud element fine! Iit just gets the damn error message. Read what I posted before, thats got all the code in which you have said to add (execpt the DECLARE_MESSAGE bit, but It still got the error) :( - Original Message - From: "Christopher Long" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 10:25 PM Subject: Re: [hlcoders] Message Problems > don't forget to hook the command in its init function AND hud.h around line > 758 make an instance of your hud objects class then lower down at line 303 > in hud.cpp call that class instances init with the rest of the inits. then > go lower down if you have vidinit stuff (sprites etc) that you wish to do. > > Its the problem i am telling you now. > - Original Message - > From: Tom <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, February 10, 2002 8:12 AM > Subject: Re: [hlcoders] Message Problems > > > > just tried it, still got the error message > > > > > > - Original Message - > > From: "Tom" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, February 09, 2002 10:07 PM > > Subject: Re: [hlcoders] Message Problems > > > > > > > on the client? None of the rest seem to do it > > > - Original Message - > > > From: "Christopher Long" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Saturday, February 09, 2002 10:02 PM > > > Subject: Re: [hlcoders] Message Problems > > > > > > > > > > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > > > > and maybe you didn't make an instance of the hud variable and call its > > > init > > > > func. > > > > - Original Message - > > > > From: Tom <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Sent: Sunday, February 10, 2002 7:30 AM > > > > Subject: [hlcoders] Message Problems > > > > > > > > > > > > > Im having some problems sending over a message, it seems to not like > > > > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > > > > > > > this is my code: > > > > > > > > > > player.cpp: > > > > > ... > > > > > int gmsgTeams = 0; > > > > > int gmsgZone = 0; > > > > > > > > > > ... > > > > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > > > > > > in zone.cpp: > > > > > > > > > > extern int gmsgZone; > > > > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > > > > WRITE_BYTE( no ); > > > > > WRITE_COORD( pev->mins.x ); > > > > > WRITE_COORD( pev->mins.y ); > > > > > WRITE_COORD( pev->mins.z ); > > > > > WRITE_COORD( pev->maxs.x ); > > > > > WRITE_COORD( pev->maxs.y ); > > > > > WRITE_COORD( pev->maxs.z ); > > > > > MESSAGE_END(); > > > > > > > > > > in hud.cpp on client: > > > > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > > > > { > > > > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > > > > } > > > > > HOOK_MESSAGE( zones ); > > > > > > > > > > in zone.cpp clientside > > > > > > > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void > > *pbuf ) > > > > > { > > > > > BEGIN_READ( pbuf, iSize ); > > > > > zones[zno].no = (int)READ_BYTE(); > > > > > for (int i=0 ; i<3 ; i++) > > > > > zones[zno].min[i] = READ_COORD(); > > > > > for (i=0 ; i<3 ; i++) > > > > > zones[zno].max[i] = READ_COORD(); > > > > > zno++; > > > > > return 1; > > > > > } > > > > > > > > > > but when I run it I always just get > > > > > > > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > > > > > > > Any ideas? > > > > > > > > > > I even tried making > > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got > the > > > > > error! > > > > > > > > > > Thanks in advance > > > > > --tom -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Message Problems
it draws the hud element fine! Iit just gets the damn error message. Read what I posted before, thats got all the code in which you have said to add (execpt the DECLARE_MESSAGE bit, but It still got the error) :( - Original Message - From: "Christopher Long" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 10:25 PM Subject: Re: [hlcoders] Message Problems > don't forget to hook the command in its init function AND hud.h around line > 758 make an instance of your hud objects class then lower down at line 303 > in hud.cpp call that class instances init with the rest of the inits. then > go lower down if you have vidinit stuff (sprites etc) that you wish to do. > > Its the problem i am telling you now. > - Original Message - > From: Tom <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, February 10, 2002 8:12 AM > Subject: Re: [hlcoders] Message Problems > > > > just tried it, still got the error message > > > > > > - Original Message - > > From: "Tom" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, February 09, 2002 10:07 PM > > Subject: Re: [hlcoders] Message Problems > > > > > > > on the client? None of the rest seem to do it > > > - Original Message - > > > From: "Christopher Long" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Saturday, February 09, 2002 10:02 PM > > > Subject: Re: [hlcoders] Message Problems > > > > > > > > > > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > > > > and maybe you didn't make an instance of the hud variable and call its > > > init > > > > func. > > > > - Original Message - > > > > From: Tom <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Sent: Sunday, February 10, 2002 7:30 AM > > > > Subject: [hlcoders] Message Problems > > > > > > > > > > > > > Im having some problems sending over a message, it seems to not like > > > > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > > > > > > > this is my code: > > > > > > > > > > player.cpp: > > > > > ... > > > > > int gmsgTeams = 0; > > > > > int gmsgZone = 0; > > > > > > > > > > ... > > > > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > > > > > > in zone.cpp: > > > > > > > > > > extern int gmsgZone; > > > > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > > > > WRITE_BYTE( no ); > > > > > WRITE_COORD( pev->mins.x ); > > > > > WRITE_COORD( pev->mins.y ); > > > > > WRITE_COORD( pev->mins.z ); > > > > > WRITE_COORD( pev->maxs.x ); > > > > > WRITE_COORD( pev->maxs.y ); > > > > > WRITE_COORD( pev->maxs.z ); > > > > > MESSAGE_END(); > > > > > > > > > > in hud.cpp on client: > > > > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > > > > { > > > > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > > > > } > > > > > HOOK_MESSAGE( zones ); > > > > > > > > > > in zone.cpp clientside > > > > > > > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void > > *pbuf ) > > > > > { > > > > > BEGIN_READ( pbuf, iSize ); > > > > > zones[zno].no = (int)READ_BYTE(); > > > > > for (int i=0 ; i<3 ; i++) > > > > > zones[zno].min[i] = READ_COORD(); > > > > > for (i=0 ; i<3 ; i++) > > > > > zones[zno].max[i] = READ_COORD(); > > > > > zno++; > > > > > return 1; > > > > > } > > > > > > > > > > but when I run it I always just get > > > > > > > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > > > > > > > Any ideas? > > > > > > > > > > I even tried making > > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got > th
Re: [hlcoders] Message Problems
don't forget to hook the command in its init function AND hud.h around line 758 make an instance of your hud objects class then lower down at line 303 in hud.cpp call that class instances init with the rest of the inits. then go lower down if you have vidinit stuff (sprites etc) that you wish to do. Its the problem i am telling you now. - Original Message - From: Tom <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 10, 2002 8:12 AM Subject: Re: [hlcoders] Message Problems > just tried it, still got the error message > > > - Original Message - > From: "Tom" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 09, 2002 10:07 PM > Subject: Re: [hlcoders] Message Problems > > > > on the client? None of the rest seem to do it > > - Original Message - > > From: "Christopher Long" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, February 09, 2002 10:02 PM > > Subject: Re: [hlcoders] Message Problems > > > > > > > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > > > and maybe you didn't make an instance of the hud variable and call its > > init > > > func. > > > - Original Message - > > > From: Tom <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Sunday, February 10, 2002 7:30 AM > > > Subject: [hlcoders] Message Problems > > > > > > > > > > Im having some problems sending over a message, it seems to not like > > > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > > > > > this is my code: > > > > > > > > player.cpp: > > > > ... > > > > int gmsgTeams = 0; > > > > int gmsgZone = 0; > > > > > > > > ... > > > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > > > > in zone.cpp: > > > > > > > > extern int gmsgZone; > > > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > > > WRITE_BYTE( no ); > > > > WRITE_COORD( pev->mins.x ); > > > > WRITE_COORD( pev->mins.y ); > > > > WRITE_COORD( pev->mins.z ); > > > > WRITE_COORD( pev->maxs.x ); > > > > WRITE_COORD( pev->maxs.y ); > > > > WRITE_COORD( pev->maxs.z ); > > > > MESSAGE_END(); > > > > > > > > in hud.cpp on client: > > > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > > > { > > > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > > > } > > > > HOOK_MESSAGE( zones ); > > > > > > > > in zone.cpp clientside > > > > > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void > *pbuf ) > > > > { > > > > BEGIN_READ( pbuf, iSize ); > > > > zones[zno].no = (int)READ_BYTE(); > > > > for (int i=0 ; i<3 ; i++) > > > > zones[zno].min[i] = READ_COORD(); > > > > for (i=0 ; i<3 ; i++) > > > > zones[zno].max[i] = READ_COORD(); > > > > zno++; > > > > return 1; > > > > } > > > > > > > > but when I run it I always just get > > > > > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > > > > > Any ideas? > > > > > > > > I even tried making > > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the > > > > error! > > > > > > > > Thanks in advance > > > > --tom > > > > > > > > ___ > > > > 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 > > > > > > > ___ > > 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 > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Message Problems
yah they do health.cpp DECLARE_MESSAGE(m_Health, Health ) DECLARE_MESSAGE(m_Health, Damage ) ammo.cpp DECLARE_MESSAGE(m_Ammo, CurWeapon ); // Current weapon and clip DECLARE_MESSAGE(m_Ammo, WeaponList); // new weapon type DECLARE_MESSAGE(m_Ammo, AmmoX); // update known ammo type's count DECLARE_MESSAGE(m_Ammo, AmmoPickup); // flashes an ammo pickup record DECLARE_MESSAGE(m_Ammo, WeapPickup);// flashes a weapon pickup record DECLARE_MESSAGE(m_Ammo, HideWeapon); // hides the weapon, ammo, and crosshair displays temporarily DECLARE_MESSAGE(m_Ammo, ItemPickup); i could go on all day. Thats your problem d00d trust me. - Original Message - From: Tom <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 10, 2002 8:07 AM Subject: Re: [hlcoders] Message Problems > on the client? None of the rest seem to do it > - Original Message - > From: "Christopher Long" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 09, 2002 10:02 PM > Subject: Re: [hlcoders] Message Problems > > > > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > > and maybe you didn't make an instance of the hud variable and call its > init > > func. > > - Original Message - > > From: Tom <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, February 10, 2002 7:30 AM > > Subject: [hlcoders] Message Problems > > > > > > > Im having some problems sending over a message, it seems to not like > > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > > > this is my code: > > > > > > player.cpp: > > > ... > > > int gmsgTeams = 0; > > > int gmsgZone = 0; > > > > > > ... > > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > > in zone.cpp: > > > > > > extern int gmsgZone; > > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > > WRITE_BYTE( no ); > > > WRITE_COORD( pev->mins.x ); > > > WRITE_COORD( pev->mins.y ); > > > WRITE_COORD( pev->mins.z ); > > > WRITE_COORD( pev->maxs.x ); > > > WRITE_COORD( pev->maxs.y ); > > > WRITE_COORD( pev->maxs.z ); > > > MESSAGE_END(); > > > > > > in hud.cpp on client: > > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > > { > > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > > } > > > HOOK_MESSAGE( zones ); > > > > > > in zone.cpp clientside > > > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void *pbuf ) > > > { > > > BEGIN_READ( pbuf, iSize ); > > > zones[zno].no = (int)READ_BYTE(); > > > for (int i=0 ; i<3 ; i++) > > > zones[zno].min[i] = READ_COORD(); > > > for (i=0 ; i<3 ; i++) > > > zones[zno].max[i] = READ_COORD(); > > > zno++; > > > return 1; > > > } > > > > > > but when I run it I always just get > > > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > > > Any ideas? > > > > > > I even tried making > > > gmsgZone = REG_USER_MSG("zones", -1); > > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the > > > error! > > > > > > Thanks in advance > > > --tom > > > > > > ___ > > > 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 > > > > ___ > 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
Re: [hlcoders] Message Problems
just tried it, still got the error message - Original Message - From: "Tom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 10:07 PM Subject: Re: [hlcoders] Message Problems > on the client? None of the rest seem to do it > - Original Message - > From: "Christopher Long" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 09, 2002 10:02 PM > Subject: Re: [hlcoders] Message Problems > > > > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > > and maybe you didn't make an instance of the hud variable and call its > init > > func. > > - Original Message - > > From: Tom <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, February 10, 2002 7:30 AM > > Subject: [hlcoders] Message Problems > > > > > > > Im having some problems sending over a message, it seems to not like > > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > > > this is my code: > > > > > > player.cpp: > > > ... > > > int gmsgTeams = 0; > > > int gmsgZone = 0; > > > > > > ... > > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > > gmsgZone = REG_USER_MSG("zones", -1); > > > > > > in zone.cpp: > > > > > > extern int gmsgZone; > > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > > WRITE_BYTE( no ); > > > WRITE_COORD( pev->mins.x ); > > > WRITE_COORD( pev->mins.y ); > > > WRITE_COORD( pev->mins.z ); > > > WRITE_COORD( pev->maxs.x ); > > > WRITE_COORD( pev->maxs.y ); > > > WRITE_COORD( pev->maxs.z ); > > > MESSAGE_END(); > > > > > > in hud.cpp on client: > > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > > { > > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > > } > > > HOOK_MESSAGE( zones ); > > > > > > in zone.cpp clientside > > > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void *pbuf ) > > > { > > > BEGIN_READ( pbuf, iSize ); > > > zones[zno].no = (int)READ_BYTE(); > > > for (int i=0 ; i<3 ; i++) > > > zones[zno].min[i] = READ_COORD(); > > > for (i=0 ; i<3 ; i++) > > > zones[zno].max[i] = READ_COORD(); > > > zno++; > > > return 1; > > > } > > > > > > but when I run it I always just get > > > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > > > Any ideas? > > > > > > I even tried making > > > gmsgZone = REG_USER_MSG("zones", -1); > > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the > > > error! > > > > > > Thanks in advance > > > --tom > > > > > > ___ > > > 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 > > > > ___ > 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
Re: [hlcoders] Message Problems
on the client? None of the rest seem to do it - Original Message - From: "Christopher Long" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 10:02 PM Subject: Re: [hlcoders] Message Problems > D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. > and maybe you didn't make an instance of the hud variable and call its init > func. > - Original Message - > From: Tom <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, February 10, 2002 7:30 AM > Subject: [hlcoders] Message Problems > > > > Im having some problems sending over a message, it seems to not like > > anything. Ive spent now about 3 hours trying to get it to work!! > > > > this is my code: > > > > player.cpp: > > ... > > int gmsgTeams = 0; > > int gmsgZone = 0; > > > > ... > > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > > gmsgZone = REG_USER_MSG("zones", -1); > > > > in zone.cpp: > > > > extern int gmsgZone; > > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > > WRITE_BYTE( no ); > > WRITE_COORD( pev->mins.x ); > > WRITE_COORD( pev->mins.y ); > > WRITE_COORD( pev->mins.z ); > > WRITE_COORD( pev->maxs.x ); > > WRITE_COORD( pev->maxs.y ); > > WRITE_COORD( pev->maxs.z ); > > MESSAGE_END(); > > > > in hud.cpp on client: > > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > > { > > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > > } > > HOOK_MESSAGE( zones ); > > > > in zone.cpp clientside > > > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void *pbuf ) > > { > > BEGIN_READ( pbuf, iSize ); > > zones[zno].no = (int)READ_BYTE(); > > for (int i=0 ; i<3 ; i++) > > zones[zno].min[i] = READ_COORD(); > > for (i=0 ; i<3 ; i++) > > zones[zno].max[i] = READ_COORD(); > > zno++; > > return 1; > > } > > > > but when I run it I always just get > > > > PF_MessageEnd_I: Unknown User Msg 100 > > > > Any ideas? > > > > I even tried making > > gmsgZone = REG_USER_MSG("zones", -1); > > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the > > error! > > > > Thanks in advance > > --tom > > > > ___ > > 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 > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Message Problems
D00d you forgot DECLARE_MESSAGE(blah, blah); in that cp file. and maybe you didn't make an instance of the hud variable and call its init func. - Original Message - From: Tom <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 10, 2002 7:30 AM Subject: [hlcoders] Message Problems > Im having some problems sending over a message, it seems to not like > anything. Ive spent now about 3 hours trying to get it to work!! > > this is my code: > > player.cpp: > ... > int gmsgTeams = 0; > int gmsgZone = 0; > > ... > gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); > gmsgZone = REG_USER_MSG("zones", -1); > > in zone.cpp: > > extern int gmsgZone; > MESSAGE_BEGIN( MSG_ALL, gmsgZone); > WRITE_BYTE( no ); > WRITE_COORD( pev->mins.x ); > WRITE_COORD( pev->mins.y ); > WRITE_COORD( pev->mins.z ); > WRITE_COORD( pev->maxs.x ); > WRITE_COORD( pev->maxs.y ); > WRITE_COORD( pev->maxs.z ); > MESSAGE_END(); > > in hud.cpp on client: > int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) > { > return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); > } > HOOK_MESSAGE( zones ); > > in zone.cpp clientside > > int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void *pbuf ) > { > BEGIN_READ( pbuf, iSize ); > zones[zno].no = (int)READ_BYTE(); > for (int i=0 ; i<3 ; i++) > zones[zno].min[i] = READ_COORD(); > for (i=0 ; i<3 ; i++) > zones[zno].max[i] = READ_COORD(); > zno++; > return 1; > } > > but when I run it I always just get > > PF_MessageEnd_I: Unknown User Msg 100 > > Any ideas? > > I even tried making > gmsgZone = REG_USER_MSG("zones", -1); > into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the > error! > > Thanks in advance > --tom > > ___ > 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
[hlcoders] Message Problems
Im having some problems sending over a message, it seems to not like anything. Ive spent now about 3 hours trying to get it to work!! this is my code: player.cpp: ... int gmsgTeams = 0; int gmsgZone = 0; ... gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", 1); gmsgZone = REG_USER_MSG("zones", -1); in zone.cpp: extern int gmsgZone; MESSAGE_BEGIN( MSG_ALL, gmsgZone); WRITE_BYTE( no ); WRITE_COORD( pev->mins.x ); WRITE_COORD( pev->mins.y ); WRITE_COORD( pev->mins.z ); WRITE_COORD( pev->maxs.x ); WRITE_COORD( pev->maxs.y ); WRITE_COORD( pev->maxs.z ); MESSAGE_END(); in hud.cpp on client: int __MsgFunc_zones(const char *pszName, int iSize, void *pbuf) { return gHUD.m_Zone.MsgFunc_Zone( pszName, iSize, pbuf ); } HOOK_MESSAGE( zones ); in zone.cpp clientside int CHudZone::MsgFunc_Zone(const char *pszName, int iSize, void *pbuf ) { BEGIN_READ( pbuf, iSize ); zones[zno].no = (int)READ_BYTE(); for (int i=0 ; i<3 ; i++) zones[zno].min[i] = READ_COORD(); for (i=0 ; i<3 ; i++) zones[zno].max[i] = READ_COORD(); zno++; return 1; } but when I run it I always just get PF_MessageEnd_I: Unknown User Msg 100 Any ideas? I even tried making gmsgZone = REG_USER_MSG("zones", -1); into gmsgZone = REG_USER_MSG("VGUIMenu", -1); but then I still got the error! Thanks in advance --tom ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders