The online racing simulator
help with Timer in insim
(1 post, started )
help with Timer in insim
hi guys
i want that the insim update the distance every 30 sec but it doesnt.
see the code below.
i put everything on the right lines


//Timers
System.Timers.Timer BackUp = new System.Timers.Timer(30000);


// Backup Users
void BackUp_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
try
{
foreach (clsConnection C in Connections)
{
FileInfo.UpdateUserLeave(C.Username, C.TotalDistance);
InSim.Send_MTC_MessageToConnection("Insim Updated", C.UniqueID, 0);
}
}
catch
{
}
}


private void Form1_load(object sender, EventArgs e)
{
try
{
BackUp.Enabled = true;
BackUp.Elapsed += new System.Timers.ElapsedEventHandler(BackUp_Elapsed);
}
catch (Exception EX)
{
MessageBox.Show("Form1_Load - " + EX.Message);
}
}
}


help with Timer in insim
(1 post, started )
FGED GREDG RDFGDR GSFDG