Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / MultiSync Strings

Author
Message
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 2nd Oct 2009 13:59
If been back to working with multisync and i cant figure out how to send 3 strings to the server .


When i do i get a result like this for example
where tempZ is the only one that holds the actual message

Server
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 2nd Oct 2009 14:13
Show us more code? Like what you're doing to those buffers you use to send strings.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Oct 2009 16:22
Indeed, we need to know how those variables are declared and such.
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 2nd Oct 2009 21:53
Sorry about that

server


Client
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Oct 2009 21:58
You aren't allocating any space to store the strings, you've simply made char pointers which point to a string literal (which is not meant to be modified).

http://www.cplusplus.com/doc/tutorial/arrays/
http://www.cplusplus.com/doc/tutorial/ntcs/
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 2nd Oct 2009 23:20
I've changed it to char tempstrX[256]; etc. and that eliminates the repeated strings but it still stores the same value in all of the strings
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Oct 2009 23:27
Well, you are just writing the X position each time.
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 2nd Oct 2009 23:29
WOW i feel dumb, thanks for your help though

Login to post a reply

Server time is: 2024-10-01 14:28:01
Your offset time is: 2024-10-01 14:28:01