Can you see whats wrong?

Started by
12 comments, last by LittleFreak 19 years, 5 months ago
Those if statements because Im little new to directx and my direct input engine kinda sucks specaily since i wrote it a year ago when i first started with Directx I think im gonna re write it then re write the hole chat program and start fresh.
Advertisement
from your code, it's seems like only one letter is going to be in m_chat_msg at any given time. since the if statements are not in a loop of any sort i don't see how you expect a string to form.

maybe more of the code and how you have your arrays initialized would be helpful.

Beginner in Game Development?  Read here. And read here.

 

Change:
Msg.ChatMsg[128] = m_Chat_Msg[128];
To:
strcpy (Msg.ChatMsg, m_Chat_Msg);

Also where is m_Chat_Msg declared?
If it's LOCAL to the function running this code segemnt, then m_Chat_Msg goes OUT OF SCOPE when you exit out of the function.
Try making m_Chat_Msg GLOBAL or declare it local to you MAIN function.

That should do it. Try it and let us know.
i guess i should have mentioned this is just part of my program. It is in a loop and they are all declared in my .h

This topic is closed to new replies.

Advertisement