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

Author Topic: [SOLVED] sf::Packet doesn't work  (Read 7071 times)

0 Members and 1 Guest are viewing this topic.

Henry

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
[SOLVED] sf::Packet doesn't work
« on: July 17, 2021, 05:54:20 pm »
Hi, a fellow newbie here, if anyone knows the solution to this problem, please help.


So, i have planned a lot about making my new multiplayer sort of game so i screw around some tcp clients and server, just experimenting how they work. i used strings to send data around but encoding and decoding them was too hard.

So i was going to use sf::Packet to send data to the server or client but when i do this:
sf::Packet newPac;
newPac << somedata;
socket.send(newPac);
 

it would give me this error: 'newPac' does not name a type
what should i do to get rid of the error?
« Last Edit: August 08, 2021, 05:37:10 am by Henry »