The online racing simulator
I have been searching for some updated examples of using any insim/outsim/outgauge library with vb.net. Can anyone post some sample code to get me started? Thanks.
Quote from ADr3nAl1n :I clicked add reference , browsed to the new dll and then released again the solution

I am doing something wrong ?

I might be wrong but judging by the 1.1.1.7's source it looks like DarkTimes used some reverse engineering tool to extract the source from the binary. If this is the case, it's likely that either the decompiler got it wrong somewhere or DarkTimes overlooked something in the chaotic code of some methods.

I was thinking about updating LFS_External for proper 0.6E support, but the occasional unholy mess made me change my mind. It might be a good idea to get in touch with T-RonX and ask him for the source if he still has it.
I noticed the problem is the GetConnIdx1 and 2 ... Well sometimes they work sometimes they don't thats the main problem since 1.1.1.7


public int GetConnIdx(int UNID)
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].UniqueID == UNID) { return i; }
}
return 0;
}
public int GetConnIdx2(int PLID)
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].PlayerId == PLID) { return i; }
}
return 0;
}

Every code that uses Connections[GetConnIdx(MSO.UCID)].blabla has this problem

I kept trying to start a new project with .NET - InSim.NET but it was never really my thing..
Quote from MadCatX :I might be wrong but judging by the 1.1.1.7's source it looks like DarkTimes used some reverse engineering tool to extract the source from the binary. If this is the case, it's likely that either the decompiler got it wrong somewhere or DarkTimes overlooked something in the chaotic code of some methods.

I was thinking about updating LFS_External for proper 0.6E support, but the occasional unholy mess made me change my mind. It might be a good idea to get in touch with T-RonX and ask him for the source if he still has it.

Decompilers don't get it wrong really, they just take the machine code and turn it back into asm. From there you can decide how you want to make it into C code or something like that, but that you'd really have to do by hand, because the asm that the decompilers turns it into could be any kinda of C construct, it just depends how it's used. There are for example, no for loops in asm, it's just a trick that the compiler abstracts for the programmer.
It's even better in .net because MSIL is a lot more verbose than asm so the decompiler should do a better job.
Quote from ADr3nAl1n :I noticed the problem is the GetConnIdx1 and 2 ... Well sometimes they work sometimes they don't thats the main problem since 1.1.1.7


public int GetConnIdx(int UNID)
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].UniqueID == UNID) { return i; }
}
return 0;
}
public int GetConnIdx2(int PLID)
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].PlayerId == PLID) { return i; }
}
return 0;
}

Every code that uses Connections[GetConnIdx(MSO.UCID)].blabla has this problem

I kept trying to start a new project with .NET - InSim.NET but it was never really my thing..

I dont have any issues with getconnidx or idx2, then again i re-writ it as the original code had a few mistakes in it, but that really has nothing to do with the lfs_external base, i suggest you do the same

Also has anyone noticed that MSO doesnt work properly since 1.1.1.7? like if a message is to long it doesnt show? same thing happends with buttons to, ive looked at the LFS_External source but everything matches the insim.txt so idk
Sadly this library is indeed too outdated to be used , the errors are always different.
Quote from ADr3nAl1n :Sadly this library is indeed too outdated to be used , the errors are always different.

Yeap tottaly agree there, ive tried insim.NET also, i just cant get the hang of it im so used to LFS_External lol, but aye i LFS_External still works for the most part, just a few little things that need to be fixed in the base for the person willing to do it (i don't think there is anyone lol), i have one of my mates that's going through it to see if he can fix the MSO bug ill let you guys know if he succeeds.
Quote from chrizza132 :Yeap tottaly agree there, ive tried insim.NET also, i just cant get the hang of it im so used to LFS_External lol, but aye i LFS_External still works for the most part, just a few little things that need to be fixed in the base for the person willing to do it (i don't think there is anyone lol), i have one of my mates that's going through it to see if he can fix the MSO bug ill let you guys know if he succeeds.

I noticed if you have the foreach (clsConn i for example and under it you have a playername like message + bla bla + i.PlayerName then the command fails showing the msg and reading the code under it, but if you use i.UserName and not requesting the player name colors then it works.

What kind of sorcery is this >:[
Quote from ADr3nAl1n :I noticed if you have the foreach (clsConn i for example and under it you have a playername like message + bla bla + i.PlayerName then the command fails showing the msg and reading the code under it, but if you use i.UserName and not requesting the player name colors then it works.

What kind of sorcery is this >:[

ive acctually just switched over to Insim.NET now ive given up with LFS_External its to old and full of bugs, i recommend you do the same, insim.NET is very similar to LFS_External, + its updated with the latest packets and has next too no bugs.
Quote from chrizza132 :insim.NET is very similar to LFS_External, + its updated with the latest packets and has next too no bugs.

It's also opensource so even if DarkTimes decided not to maintain it any further, it's not a problem for anybody to take over and keep it up to date.
I just noticed Insim.NET is kind of hallow , It doesn't contain send buttons , send messages . Or I am missing something ?

Also what is the InSimDotNet.pdb ? On Build > properties i found the advanced button on bottom that links to the old one
Quote from ADr3nAl1n :I just noticed Insim.NET is kind of hallow , It doesn't contain send buttons , send messages .

It does, take a look at the documentation
Quote from ADr3nAl1n :
Also what is the InSimDotNet.pdb ? On Build > properties i found the advanced button on bottom that links to the old one

PDB is a Program DataBase. For a .NET executable it contains only names of the source files and local variables and some information to match the assembly code to a particular line in a source file. It's used to help debugging.
Quote from ADr3nAl1n :I just noticed Insim.NET is kind of hallow , It doesn't contain send buttons , send messages . Or I am missing something ?

Also what is the InSimDotNet.pdb ? On Build > properties i found the advanced button on bottom that links to the old one

if you look carefully theres a few examples in the Insim.NET thread, on some page, i found it really help full, yes you can make buttons its really simple to do,

example would be


<?php 
InSim
.Send(new ButtonPacket info })
?>

I love the documentation <3
Quote from t-ronx :hello,

lfs external is an insim/outsim/outgauge sdk library for the .net framework. This software allows you to build your own external live for speed applications.
You can use lfs external with any .net language that supports dll files. It fully supports insim v4, outgouge and outsim, c# and vb.net example code is included.

requirements:
- microsoft visual c# express edition 2005/2008 (free!) (or another c# ide) or
- microsoft visual basic express edition 2005/2008 (free!) (or another vb.net ide)
- knowledge of c# or vb.net

download

insim example
- lfs external 1.1 with insim example for c#
- lfs external 1.1 with insim example for vb.net

outsim and outgauge example
- lfs external 1.1 with outsim and outgauge example for c#
- lfs external 1.1 with outsim and outgauge example for vb.net

library only
- lfs external 1.1 library only (for advanced users)

obsolete
- lfs external 1.04 (not recommended, old version)

update 1.1.1.4
- updated tcp code
- small performance improvement

update 1.1.1.3
- resolved string issue

update 1.1.1.2
- added missing tiny and small send methods

update 1.1.1.0
- added support for outsim and outgauge

update 1.1.0.0
- faster and more reliable connection to host
- auto reconnect on connection failure
- better error handling
- example code for c# and vb.net
- used more descriptive method names
- now supports multiple instances of insiminterface
- lot of small things

update 1.04
- added intakerestriction property to players class
- removed unused property in players class
- player rename bug now really fixed
- included license file

update 1.03
- fixed player rename bug
- added missing bfn (shift+i ingame) receive event

update 1.02
- fixed crash on crowded server

update 1.01
- compiled to dll
- works much better but by far not perfect
- fixed lot of bugs
- added full udp support
- flags now work how they should

updates since previous vb .net version:
- upgraded to c#
- v4 support
- supports mci/nlp
- automatically maintenances connections and players list
- a lot more..

can u please update a download link for c# ?
LFS_External is dead, for a new project consider InSim.NET instead.
I search the Example too...
Ok its Dead but InSim.NET does have any Example project and no good Tutorial File for a beginner LFS InSim Programmer!
InSim.NET provides a few simple examples how to use it on its CodePlex homepage in "Documentation" section.
Thanks for that but this Documentation is not the same like from the old LFS External. There are a nice Tutorial Document (Word File) where you get explained step by step how you Create a Button, you create a message etc. here are only little things not more...

Sorry but i am a newb in LFS Programming... I can Create own Programs etc. but in LFs it is a complete other thing!
Maybe you should read the documentation for InSim itself then? It describes in detail the meaning of each packet. Creating or reading them with InSim.NET should be easy.
I Read it but i current dont understand it...

.NET - LFS External (InSim/OutSim/OutGauge SDK Library)
(538 posts, started )
FGED GREDG RDFGDR GSFDG