The online racing simulator
Good work!
Uploaded 2.0.4 Beta to CodePlex, this is one of the very, very last betas, honestly. As soon as I've finished the documentation it will go final.

Changes in this release
  • Support for double-byte character sets, for Japanese, Traditional Chinese, Simplified Chinese and Korean strings.
  • Fixed several bugs in OutGauge and OutSim support, plus cleaned up and improved reliability of the UDP timeout.
  • Can now save/load InSimSettings to/from XML (handy for implementing a quick config file)
  • Improved performance and reliability of packet binding (also improved packet binding for languages that do not support generics, like IronPython)
  • Added InSim.Send(IEnumerable<ISendable>) method that allows you to batch send packets (for improved network performance when sending lots of packets)
  • Improvements to PacketFactory, that now much better allows you to implement and configure your own packet-handling code
  • Changed the way InSim.NET handles CLS (Common Language Specification) compatibility, this means the return of bytes and short etc for many packets
  • Completely tweaked and improved documentation (fixed lots of typos and cleared up grammar)
  • Lots of small tweaks to packets to remove some oddities and generally cleanup the API
  • Lots, lots more!
I've started typing up the documentation for this, but it's still a work in progress. If someone would like something explained, or thinks something should be in the (In)FAQ, then give us a shout.

You can view the documentation as a work in progress here: http://insimdotnet.codeplex.com/documentation
I really wish you would just go ahead and learn PHP, and then help with PRISM . As always, great job.
Quote from Dygear :I really wish you would just go ahead and learn PHP, and then help with PRISM . As always, great job.

That means forcing many other people to learn PHP too
Quote from Dygear :I really wish you would just go ahead and learn PHP, and then help with PRISM . As always, great job.

Technically I do know PHP, I'm just really bad at it. PHP was one of the first languages I ever learnt, but I can't really remember much about it.
Quote from DarkTimes :Technically I do know PHP, I'm just really bad at it. PHP was one of the first languages I ever learnt, but I can't really remember much about it.

Once you learn one programming language, you know them all really. Except ASM, because that's some odd stuff right there.
I released the final version of InSim.NET 2.0 to CodePlex.

It's finished, more or less.

http://insimdotnet.codeplex.com/

I also updated the first page of this thread and changed the title.

Fin.
Quote from Dygear :Once you learn one programming language, you know them all really. Except ASM, because that's some odd stuff right there.

Well, this is certainly true for the C-family of languages, such a *PHP, Java, and C# (even Ruby), but not so much for functional programming languages, such as a Lisp and Haskell. The functional languages do require you to think is a new and different way about your code, especially if you've been stuck in the C-world for a long time. It's an eye opening experience to go code a bunch of Haskell for a while... and also worthwhile doing.

It is a mistake a lot of novice programmers make to worry about which language they should learn, as opposed to which language they should learn first. Once you've learnt a programming language picking up others is normally just a case of doing a mental bit-shift to a different syntax. All the fundamental ideas that underlie them are the same.

* I should probably note that my issue with PHP is that it just doesn't make sense to me when I code it, it doesn't flow off my fingers the way C#, Python and *Ruby do. I find there are so many oddities, so many small things that interrupt my flow and make me scratch my head. I'm sure all that would go away if I had more (recent) practice at it. To me PHP just has no aesthetic, no vision and no consistency. It's the perfect example of a language designed by a committee that couldn't agree about anything. That being said, it is one of the most used programming languages ever, half the internet is built on it, so maybe I don't know what I'm talking about.

* Incidentally if I had half an impulse to write a new InSim library, Ruby would be a pretty sound bet. I don't though.
Funny you should say that, I was thinking about learning Ruby. But I digress back to the topic at hand.
-
(DarkTimes) DELETED by DarkTimes
Pushed a small release out with a few corrections, mainly the documentation. I remembered I hadn't updated the help-file generator for a while, so I got the latest version with a bunch of fixes. I also improved the documentation generally and fixed a bunch of typos. In addition I cleaned-up some of the source code to make it 3.78% less crap overall.

http://insimdotnet.codeplex.com/releases/
Hello InSim in VB.NET

Imports InSimDotNet

Module InSimExample

Sub Main()
' Create InSim object
Dim insim As New InSim()

' Initialize InSim with specified settings
insim.Initialize(New InSimSettings() With {.Host = "127.0.0.1", .Port = 29999, .Admin = String.Empty})

' Send message to chat
insim.Send("/msg Hello, InSim!")

' Keep program open
Console.WriteLine("Press any key to exit...")
Console.ReadKey(True)
End Sub

End Module

Hello InSim in C++/CLI

#include "stdafx.h"

using namespace System;
using namespace InSimDotNet;

int main(array<String ^> ^args)
{
// Create InSim object
InSim ^insim = gcnew InSim();

// Initialize InSim
InSimSettings ^settings = gcnew InSimSettings();
settings->Host = L"127.0.0.1";
settings->Port = 29999;
settings->Admin = String::Empty;
insim->Initialize(settings);

// Send message to chat
insim->Send(L"/msg Hello, InSim!");

// Stop program from exiting...
Console::WriteLine(L"Press any key to exit...");
Console::ReadKey(true);

return 0;
}

Hello InSim in IronPython

import clr
clr.AddReference('System')
clr.AddReference('InSimDotNet')

from System import *
from InSimDotNet import *

# Create InSim object
insim = InSim()

# Initialize InSim
settings = InSimSettings()
settings.Host = '127.0.0.1'
settings.Port = 29999
settings.Admin = String.Empty
insim.Initialize(settings)

# Send message to chat
insim.Send('/msg Hello, InSim!')

# Stop program from exiting
Console.WriteLine('Press any key to exit...')
Console.ReadKey(True)

Hello InSim in C#

using System;
using InSimDotNet;

class Program {
static void Main() {
// Create InSim object
InSim insim = new InSim();

// Initialize InSim
insim.Initialize(new InSimSettings {
Host = "127.0.0.1",
Port = 29999,
Admin = String.Empty,
});

// Send message to chat
insim.Send("/msg Hello, InSim!");

// Stop program from exiting
Console.WriteLine("Press any key to exit...");
Console.ReadKey(true);
}
}

Ok, now your just showing off.
Hahaha..

Though, you would do the same, Dygear, wouldn't you?
Well, I wrote them for myself because I wanted to get an idea of how InSim.NET would look in the different .NET languages, so I figured I'd just post it. I thought it was quite interesting, although examples that showed receiving packets would probably be better, as that's where the languages seem to diverge the most.

Just to note that I haven't done IronRuby or F#, mainly because IronRuby has stopped working with VS2010 SP1 and I don't really understand F# yet.
Waiting for Z30 update of this library.
I've uploaded a new version for InSim 5 to the repository, but I haven't been able to test it yet. My graphics card is broken and these onboard graphics struggle to run Solitaire (seriously), so running LFS is a bit of a pain. I'll see what I can do tomorrow.

Feel free to try it and report any bugs in the meantime and I'll see what I can do (I also accept patches of course).

Note: the update is in the repository, there is no release yet.
Not sure what's wrong, but using the updated or the old library gives me this:

Apr 22 21:39:41 InSim - TCP : [LsC]
Apr 22 21:39:41 InSim guest closed : [LsC]

EDIT: I'm retarded, don't mind this post.
EDIT2: The new library update works perfect on LsC! Thanks DarkTimes for the quickest library update on LFS!
I pushed a new changeset onto CodePlex with some fixes for the IS_CON support, it should now work correctly. I also just removed the version check for now, so this version should work with InSim 4 and 5.
Just a strange thing I've noticed: When there's more than 6~ players in the servers, it seems that the BTT packet is giving me wrong things.

I use it for a Send Cash function, and the text coming through is blank I think... E.G I enter "123", then I use the "Convert.ToInt32(BTT.Text);" and it returns me a "0".

It may be my code after the library change, or it could be a bug in the library itself.

I will try and investigate it today, to see if I can make a conclusion on why that's happening.

EDIT: Another thing I've noticed is, "InSim.Send(Conn.UniqueID, "^6> ^7Test");" doesn't get sent to the connection. I'm pretty sure the code doesn't fail while performing it e.g no "catch" etc. I know this because I have a Unit changer in the app, and the units change, but the message doesn't show up.

EDIT2: I'm currently making a separate application to read the outputs of the BTT packet while there are many players real time on my server. Will post back results later...
I uploaded a changset with a fix for the MTC bug.

In terms of the BTT packet, it works fine for me, that packet hasn't changed as far as I'm aware. I don't understand why it would fail after 6 players are on the server and I don't have the ability to test that myself right now.
I take back my words. After making a new app with the BTT packet, it seems to work fine.

Sorry for any trouble.

Will test the MTC now.

EDIT: Yep, IS_MTC works perfectly now. Still not understanding what's causing my BTT problem, as I haven't changed the code. It works up to 14 people Ah the nightmares........
Just a reminder that you can attach an event to InSim.InSimError to see if any background exceptions are being thrown. You can also look at the Debug > Windows > Output window, as background exceptions are dumped to the debug output as well (handy for copy/paste). The packet handlers are called from a background thread so any exceptions thrown in the packet events will only get picked up by InSimError, that is if you don't catch them yourself.
Found the problem...

The fault is some characters from LFS cannot be displayed on buttons, so that catches the code and the cash is converted after the buttons.

The following name doesn't work:

¦¨¦×ÂÆùÇÆÍß¡¶



Hope you can fix it. If not, just replace the special chars with "?"

Thanks.
What's the exception that gets thrown? Also does the error occur when receiving a string or sending a string?

FGED GREDG RDFGDR GSFDG