see a quite more easy to implement.
Tested the unitpacket, this operations os pointers is strange a lot for me, i cant see any logic here kkkkk
uses
SysUtils, PacketUnit;
var
p1, p2: Pointer;
Match, Win, Loss, Points: Cardinal;
i: integer;
ret: string;
p : TNetworkPacket;
begin
while true do
begin
if Engine.WaitAction([laSysMsg], p1, p2) = laSysMsg then
begin
if Cardinal(p1) = 1987 then
begin
p:=TNetworkPacket.Create(p2,46);
Print(p.ReadS);
p:=nil;
end;
if Cardinal(p1) = 1673 then
begin
p:=TNetworkPacket.Create(p2,24);
Match := p.ReadD;
Win := p.ReadD;
Loss := p.ReadD;
Points := p.ReadD;
p:=nil;
print(format('Match: %d; Win: %d; Loss: %d; Points: %d', [Match, Win, Loss, Points]));
end;
end;
end;
end.