Hey guys,
I'm trying to get a better view on InSim through the .NET - LFS External (InSim/OutSim/OutGauge SDK Library) by T-RonX.
First of all I'm trying to make a simple thing:
If the first player crosses the line, it saves his names to an array. This works.
When I enable a timer after the adding-to piece, that has an interval of 2 minutes, and restarts the race then, it doesn't work. This are some things are tried and I came up with this weird thing:
1.
I enabled a timer from the MSO sub. When I type !blaat, a timer gets activated and once it ticks, it says "Blaat". This works.
2.
I replaced the code which is in timer tick function to the code it should be (underneath an example). The code fails (= it doesn't does anything, no messages, ...) with no error.
3.
I placed the code which doesn't works in the timer tick at step 2 to the !request. This works.
I hope the steps gave a better vieuw at the problem and I hope someone can come up with a solution
Ciao & Thanks!
I'm trying to get a better view on InSim through the .NET - LFS External (InSim/OutSim/OutGauge SDK Library) by T-RonX.
First of all I'm trying to make a simple thing:
If the first player crosses the line, it saves his names to an array. This works.
When I enable a timer after the adding-to piece, that has an interval of 2 minutes, and restarts the race then, it doesn't work. This are some things are tried and I came up with this weird thing:
1.
I enabled a timer from the MSO sub. When I type !blaat, a timer gets activated and once it ticks, it says "Blaat". This works.
MSO:
Case "!request"
Timer3.Enabled = True
------
Timer3 Tick:
Insim.Send_MST_Message("/blaat")
2.
I replaced the code which is in timer tick function to the code it should be (underneath an example). The code fails (= it doesn't does anything, no messages, ...) with no error.
MSO:
Case "!request"
Timer3.Enabled = True
------
Timer3 Tick:
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim i As Integer
everyfinish = True
InSim.Send_MST_Message("/msg ^7Race ^1ended! ^7Restart in^1 0.5 minutes!")
For i = 0 To UBound(finished)
InSim.Send_MST_Message("/msg " & i + 1 & ". " & finished(i))
Next i
Timer3.Enabled = False
3.
I placed the code which doesn't works in the timer tick at step 2 to the !request. This works.
MSO:
Case "!request"
Dim i As Integer
everyfinish = True
InSim.Send_MST_Message("/msg ^7Race ^1ended! ^7Restart in^1 0.5 minutes!")
For i = 0 To UBound(finished)
InSim.Send_MST_Message("/msg " & i + 1 & ". " & finished(i))
Next i
I hope the steps gave a better vieuw at the problem and I hope someone can come up with a solution
Ciao & Thanks!