No "You picked up %1" ? What did I break?!
by Robert Brower · in Torque Game Engine · 10/30/2002 (8:59 am) · 2 replies
I'm not getting 'You picked up %1' messages when I pick up items in my game. I've figured out by using echo() that the data or %message seems to be empty upon entering onServerMessage(). I cannot figure out why this is happening. I'm stumped.
I think it could be the engine but I haven't a clue what I did to break it. Has anyone else ever had this problem and solved it?
my console log shows something noteworthy and peculiar when i pick something up... although again I don't understand the source of it.
>Mapping string: MsgItemPickup to index: 13
>Mapping string: to index: 14
>onServerMessage() called
>
You can see where the string should be here... it should say Mapping string: 'You picked up a map' to index : 14. After that, you can see where I am echoing 'onServerMessage() called' and also the blank line > should be the result of echo(%message) and it is empty.
More info... in ItemData::onPickup() if I remove the /c0 from the string in the following line then I get the text in the chat hud.
// Inform the client what they got.
if (%user.client)
messageClient(%user.client, 'MsgItemPickup', '\c0You picked up %1', %this.pickupName);
Okay the problem I have narrowed down to being the \c0 in the string arg in messageClient(). If I change it to \c1 i get the message in the chat hud. \c0 i get no message.
I'm quite stumped. Any ideas would be greatly appreciated.
I think it could be the engine but I haven't a clue what I did to break it. Has anyone else ever had this problem and solved it?
my console log shows something noteworthy and peculiar when i pick something up... although again I don't understand the source of it.
>Mapping string: MsgItemPickup to index: 13
>Mapping string: to index: 14
>onServerMessage() called
>
You can see where the string should be here... it should say Mapping string: 'You picked up a map' to index : 14. After that, you can see where I am echoing 'onServerMessage() called' and also the blank line > should be the result of echo(%message) and it is empty.
More info... in ItemData::onPickup() if I remove the /c0 from the string in the following line then I get the text in the chat hud.
// Inform the client what they got.
if (%user.client)
messageClient(%user.client, 'MsgItemPickup', '\c0You picked up %1', %this.pickupName);
Okay the problem I have narrowed down to being the \c0 in the string arg in messageClient(). If I change it to \c1 i get the message in the chat hud. \c0 i get no message.
I'm quite stumped. Any ideas would be greatly appreciated.
#2
10/30/2002 (6:02 pm)
Ah thank you so much. I updated and got the head versions of those files and did a full rebuild and DELETED my DSO files and it all works now. Thanks a lot. and Thanks Joel.
Torque Owner Richard O
Joel has fixed the problem you are encountering in the HEAD version. Take a look at Change # 3002 here.
Rich