The online racing simulator
Hello World!
2
(39 posts, started )
what errors? can you post them here?
remember that this method (called whenever your program gets hit by a MCI packet) is assuming the existence of:
  1. a List of clsPlayers called "Players".
  2. a method called GetPlyIdx, which given a a PLID (player ID) will return the index of that player in the list Players.
Obviously, if both these are true, it also requires that
  1. Players != null
  2. for each PLID in MCI Packet exists a clsPlayer in Players
So make sure you are constructing your list of players BEFORE any MCI packets are received (for example, build the list on receiving the enter server packet (I forget the name), and keep the list updated whenever someone leaves, joins, drops, etc. That list of players and connections will be your life, so keep it in tip-top shape at all times.
Sorry m8, i do not code,
I learned how to use c# , to change text in dougies insim, Save, compile and upload, get it running on my server but now my mind is blank,

So unless someone shows me what to do, or post a fixed version, then i will not be able to fix it meself

Thank you
Mick
Quote from Mikjen :Sorry m8, i do not code, ...
So unless someone shows me what to do, or post a fixed version, ...

:banghead::doh:
Excellent just what i was looking for
Well, I can do a bit of programming (learned several languages in the past) but am new to Visual Studio.
Right now I'm puzzled where and when the <user>.txt files are being read. I can find methods to do so in the fileinfo.cs, but I can't find any call to these methods anywhere. I can add a variable to this file, it's being written properly, but isn't being read back when it's meant to be..
Can anyone put me in the right direction?
thanks but
hi i put this into my cruise insim the one from dougie and i get a error:

Error 1 'LFS_External_Client.clsPlayer' does not contain a definition for 'position' and no extension method 'position' accepting a first argument of type 'LFS_External_Client.clsPlayer' could be found (are you missing a using directive or an assembly reference?)

im not the best coder in the world and just getting to understand the packets but this isnt yet in my brain
You are trying to access a field or property on the clsPlayer class which does not exist. Open the file that contains that class (clsPlayer.cs probably) and confirm that the 'position' property does indeed exist and has a public accessor. If it does not you may need to create it.
Quote from DarkTimes :You are trying to access a field or property on the clsPlayer class which does not exist. Open the file that contains that class (clsPlayer.cs probably) and confirm that the 'position' property does indeed exist and has a public accessor. If it does not you may need to create it.

ive done a search for position in the cls.Player.cs and nothing came back so how could i create one?
If I was mean I'd say go... http://www.google.com/search?q=learn+c%23... yourself.

Firstly, without seeing the code it's very hard for me to tell exactly what the problem is, however it looks likely that the issue is that the 'position' property simply doesn't exist. If that is the case then you can create a new property by adding the following code to the clsPlayer class.

public int position
{
get;
set;
}

It may be that 'int' is not the correct data-type for this, but it probably will be.

I highly suggest that you take a look at the link I posted, as even spending an hour reading a tutorial about the C# language would have prevented you having this problem. It would also have made you a better person.
Ty!
thank you very much this has worked but ive just gotta test it now wish me luck and thank you ever so much ill read a tutorial but alot of the tutorials arnt about packets right?
No, the tutorials are not about packets, they are about the C# programming language itself. They explain what variables, conditions and loops are, as well as classes, fields, properties and methods. Once you understand those ideas, you will vastly reduce the amount of problems you have working with the C# language. Of course this is just a sub-set of what the C# language is capable of, but it's enough to get you through most situations.
ok
ok all good but when i start the insim it says
Quote :MCI - Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

and lots of features arnt working like !kick !ban and the money counters stopped going up have you got msn?
Nope sorry I don't do MSN, plus I don't know anything about the open source cruise server anyway.
:(
well i dont know what to do next
2

Hello World!
(39 posts, started )
FGED GREDG RDFGDR GSFDG