[SIZE=2][COLOR=#0000ff]Imports[/COLOR][/SIZE][SIZE=2] FullMotion.LiveForSpeed.InSim.Enums[/SIZE]
[SIZE=2][COLOR=#0000ff]Module[/COLOR][/SIZE][SIZE=2] Module1[/SIZE]
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]WithEvents[/COLOR][/SIZE][SIZE=2] InSimHandler [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] InSim.InSimHandler[/SIZE]
[SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Main()[/SIZE]
[SIZE=2]ConnectToLFS([/SIZE][SIZE=2][COLOR=#a31515]"127.0.0.1"[/COLOR][/SIZE][SIZE=2], 29999)[/SIZE]
[SIZE=2]Console.WriteLine([/SIZE][SIZE=2][COLOR=#a31515]"Press Enter to Exit"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]Console.ReadLine()[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] ConnectToLFS([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] IP [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] Port [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]InSimHandler.Configuration.LFSHost = IP[/SIZE]
[SIZE=2]InSimHandler.Configuration.LFSHostPort = Port[/SIZE]
[SIZE=2]InSimHandler.Configuration.UseTCP = [/SIZE][SIZE=2][COLOR=#0000ff]True[/COLOR][/SIZE]
[SIZE=2]InSimHandler.Configuration.ReplyPort = 30000[/SIZE]
[SIZE=2]InSimHandler.Configuration.Local = [/SIZE][SIZE=2][COLOR=#0000ff]True [/COLOR][/SIZE]
[SIZE=2]InSimHandler.Configuration.ProgramName = [/SIZE][SIZE=2][COLOR=#a31515]"InGame"[/COLOR][/SIZE]
[SIZE=2]Console.WriteLine([/SIZE][SIZE=2][COLOR=#a31515]"Try to connect"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]InSimHandler.Initialize(3)[/SIZE]
[SIZE=2]Console.WriteLine([/SIZE][SIZE=2][COLOR=#a31515]"Connected"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]InSimHandler.RequestState()[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]InSimHandler = [/SIZE][SIZE=2][COLOR=#0000ff]Nothing[/COLOR][/SIZE]
[SIZE=2]Console.WriteLine([/SIZE][SIZE=2][COLOR=#a31515]"Failed to connect "[/COLOR][/SIZE][SIZE=2] & vbCrLf & ex.Message)[/SIZE]
[SIZE=2][COLOR=#0000ff]Return[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] InSimHandler_Updated([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] InS [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] FullMotion.LiveForSpeed.InSim.Events.State) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] InSimHandler.[B][COLOR=red]LFSState[/COLOR][/B][/SIZE]
[SIZE=2]Console.WriteLine(InS.Weather)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Module[/COLOR][/SIZE]
I know you are not very familiar with vb Syntax.
But do you know why i get an error at the
Handles InSimHandler.LFSState ?
With the old LFSLib it worked.
I get the error
"Fehler 1 Die Methode "Private Sub InSimHandler_Updated(InS As FullMotion.LiveForSpeed.InSim.Events.State)" kann das Ereignis "Public Event LFSState(sender As FullMotion.LiveForSpeed.InSim.InSimHandler, e As FullMotion.LiveForSpeed.InSim.Events.State)" nicht behandeln, da sie nicht die gleiche Signatur haben."
"Not the same signatur"