hi
i get everytime a error message from MCI with a index problem when someone leaved the pits. it happends in Debug mode to.
and no i dont get a NPL error, i'm sure it is a MCI error.
check attachment( ITS DUTCH )
see the code below for the Leave pit event
my questions are:
1. can this be solved
so yes , help me
2. and how to code to dont get this error
i get everytime a error message from MCI with a index problem when someone leaved the pits. it happends in Debug mode to.
and no i dont get a NPL error, i'm sure it is a MCI error.
check attachment( ITS DUTCH )
see the code below for the Leave pit event
// A player joins the race. If PLID already exists, then player leaves pit.
private void NPL_PlayerJoinsRace(Packets.IS_NPL NPL)
{
try
{
if (Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^0[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^1[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^2[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^3[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^4[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^5[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^6[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^7[COP]") || Connections[GetConnIdx(NPL.UCID)].PlayerName.Contains("^8[COP]"))
{
if (Connections[GetConnIdx(NPL.UCID)].TotalDistance >= (1000000))
{
Connections[GetConnIdx(NPL.UCID)].CurrentCar = NPL.CName;
if (Connections[GetConnIdx(NPL.UCID)].Cars.Contains(NPL.CName) != true)
{
InSim.Send_MST_Message("/spec " + Connections[GetConnIdx(NPL.UCID)].Username);
InSim.Send_MST_Message("/msg ^3»^7 " + Connections[GetConnIdx(NPL.UCID)].PlayerName + "^7 tried to steal " + NPL.CName);
InSim.Send_MST_Message("/msg ^3»^7 But failed and will fined €100 for stealing a car");
Connections[GetConnIdx(NPL.UCID)].Cash -= 100;
}
else
{
Connections[GetConnIdx(NPL.UCID)].PitOverride = 0;
}
Connections[GetConnIdx(NPL.UCID)].CurrentCar = NPL.CName;
InSim.Send_MTC_MessageToConnection("^3»^7 Drive Save^1!! ^7And drive on the right side of the road^1!!!", NPL.UCID, 0);
bool LeavesPits = AddToPlayersList(NPL); // Update Players[] list
}
else
{
InSim.Send_MST_Message("/spec " + Connections[GetConnIdx(NPL.UCID)].Username);
InSim.Send_MTC_MessageToConnection("^1You Cant be a COP! Please Remove The Tag!", NPL.UCID, 0);
InSim.Send_MTC_MessageToConnection("^1You need to drive 1000km for being a COP", NPL.UCID, 0);
}
}
}
catch (Exception EX)
{
MessageBox.Show("NPL - " + EX.Message);
}
}
my questions are:
1. can this be solved
so yes , help me
2. and how to code to dont get this error