//CompCar is the CompCar packet structure I added to clsPlayer int idx = 0; for (int i = 0; i < MCI.NumC; i++) { idx = GetPlyIdx(MCI.Info[i].PLID); Players[idx].CompCar.AngVel = MCI.Info[i].AngVel; //They aren't structures so you cant serialize! Players[idx].CompCar.Direction = MCI.Info[i].Direction; Players[idx].CompCar.Heading = MCI.Info[i].Heading; Players[idx].CompCar.Info = MCI.Info[i].Info; Players[idx].CompCar.Lap = MCI.Info[i].Lap; Players[idx].CompCar.Node = MCI.Info[i].Node; Players[idx].CompCar.PLID = MCI.Info[i].PLID; Players[idx].CompCar.Position = MCI.Info[i].Position; Players[idx].CompCar.Speed = MCI.Info[i].Speed; Players[idx].CompCar.X = MCI.Info[i].X; Players[idx].CompCar.Y = MCI.Info[i].Y; Players[idx].CompCar.Z = MCI.Info[i].Z; }
The big problem is how to "add the CompCar Packet struct to the clsPlayer structure" like elmohellno said.
Without this change, the compiler returns: "'LFS_External_Client.clsPlayer' does not contain a definition for 'CompCar' and no extension method 'CompCar' accepting a first argument of type 'LFS_External_Client.clsPlayer' could be found (are you missing a using directive or an assembly reference?)"