Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dean404

Pages: [1]
1
Network / Re: Packet receives empty string
« on: June 18, 2015, 03:05:34 am »
Oh lol, i am so stupid, forgot to add sfml-network.lib. Working fine now.

2
Network / Re: Packet receives empty string
« on: June 17, 2015, 10:13:25 pm »
Here's the separate programm, that has to send std::string through packet:
(click to show/hide)
And here is the result:
(click to show/hide)
(The last line is "Press any button to continue..." in russian)

3
Network / Re: Packet receives empty string
« on: June 17, 2015, 09:58:46 pm »
I think the new_building has to be char *
Nope, it's still nothing.

4
Network / Packet receives empty string
« on: June 17, 2015, 06:57:11 pm »
string_to_send = "P";
packetSend << string_to_send << pointer_x << pointer_y;
                                globalMutex.unlock();
                                socket.send(packetSend);
Sending code
if (packetReceive >> new_building >> new_x >> new_y)
                {
                                        map[new_y][new_x] = new_building;                                      
                                        SomethingChanged = true;
                }
Receiving code.
And new_building equals nothing. Please, tell me, what am I doing wrong here. new_x and new_y are all right, though.

Pages: [1]