1
General / 2 Problems
« on: July 01, 2008, 11:54:40 am »
Hm Why sou are link to the ending "-s" ?
Try it normal with "SFML-...lib" without ending "-*"
Try it normal with "SFML-...lib" without ending "-*"
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.
Quotebut it isnt working...
Can you give more details please ?
Well, you are sending the packet twice... that may be a problem.
struct Position
{
int x;
int y;
int rot;
};
sf::SocketTCP Server;
if (!Server.Listen(1000))
return EXIT_FAILURE;
sf::IPAddress ClientAddress;
sf::SocketTCP Client;
Server.Accept(Client, &ClientAddress);
sf::Packet RegularPacket;
Position P;
sf::IPAddress ServerAddress = sf::IPAddress::GetLocalAddress();
sf::SocketTCP Client;
if (!Client.Connect(1000, ServerAddress))
return EXIT_FAILURE;
sf::Packet RegularPacket;
Position P;
if (Client.Receive(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;
if (RegularPacket >> P)
{
s_auto.SetPosition(P.x,P.y);
s_auto.SetRotation(P.rot);
}
P.x = pos.x;
P.y = pos.x;
P.rot = rot;
if (RegularPacket << P)
{
if (Client.Send(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;
}
if (Client.Send(RegularPacket) != sf::Socket::Done)
return EXIT_FAILURE;
if (!BackgroundImage.LoadFromFile("background.jpg"))
return EXIT_FAILURE;
Unbehandelte Ausnahme bei 0x7c43eba2 in SFML.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00133000.
Unbehandelte Ausnahme bei 0x104817fd (msvcp80d.dll) in SFML.exe: 0xC0000005: Zugriffsverletzung beim Schreiben an Position 0xcccccccc.