The online racing simulator
Searching in All forums
(838 results)
mcgas001
S3 licensed
Quote from JamesF1 :Well that was smart :dunce:

LOL!, Didnt see you notice it neither
mcgas001
S3 licensed
For the record, I have now fixed this. I was trying to connect and yet UDP is connectionless. Silly me...

But, Thanks to T-RonX as he showed me that i had it wrong.
mcgas001
S3 licensed
Are you sure thats correct DarkTimes?

Im sure you have to define a data type for ply

For Each Ply As clsPlayer in Players
InitializeHUD(Ply.UniqueID)
Next Ply

Shrug
mcgas001
S3 licensed
OMMGZZ IMZZZ SOO|ZZ DUMBBBBB!!!!!1111eleven1!!!1111!!!!! :dopey::dopey:
mcgas001
S3 licensed
Why have an agreement and rules? Thats just pointless IMO...

E: If thats the case, Why link the forums rules to that, When you remove posts and threads for all kinds of bs?
Last edited by mcgas001, .
mcgas001
S3 licensed
Quote from AndroidXP :I think when I was messing around with OutSim I had the same, or at least a similar problem. Switching from UdpClient to using Sockets mysteriously solved it.

Hasnt with me. Although now, it doesnt even receive one packet. It just blocks indefinitely....

E: Its acutally rather strange. Sdthers LFSLib and example OutGauge app works....
mcgas001
S3 licensed
Quote from JamesF1 :There's no need for a memset equivalent in C#, in this case

Bit of a mystery eh?
mcgas001
S3 licensed
Quote from Stuff :This is a long shot, but maybe its being more like C and not so # (sharp) in that your Rcv_Buffer already has random data in it. In C this would be solved by memset, which sets all bytes to 0. I dunno much about C# but my guess is this is done implicitly but ya never know, I certainly don't

Well, If that was the case then the only problem would be marshalling it from packets to struct. I dont see how that could stop it receiving packets..
mcgas001
S3 licensed
"ZOMG I HAZ S3!!1111oneeleven!1111one!!!"

:hide:
mcgas001
S3 licensed
[SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] ConnectToOutGauge([/SIZE][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] Port)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#008000] // Make a new instance of the UdpClient[/COLOR][/SIZE]
[SIZE=2] Client = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]UdpClient[/COLOR][/SIZE][SIZE=2](Port);[/SIZE]

[SIZE=2][COLOR=#008000] // Remote end point to listen on[/COLOR][/SIZE]
[SIZE=2] RemoteIpEndPoint = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]IPEndPoint[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].Any, Port);[/SIZE]

Client.Connect("127.0.0.01", Port);

[SIZE=2][COLOR=#008000] // Thread to put the receive on[/COLOR][/SIZE]
[SIZE=2] Rcv_Thd = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Thread[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]ThreadStart[/COLOR][/SIZE][SIZE=2](RecieveWorker));[/SIZE]
[SIZE=2] Rcv_Thd.Start();[/SIZE]

[SIZE=2] _isConnected = [/SIZE][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]}[/SIZE]

[SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] RecieveWorker()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff] while[/COLOR][/SIZE][SIZE=2] (!Exit)[/SIZE]
[SIZE=2] {[/SIZE]
[SIZE=2][COLOR=#008000] // Receive data, send it to the buffer[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000] //(This is where it gets stuck on...)[/COLOR][/SIZE]
[SIZE=2] [SIZE=2]Rcv_Buffer = Client.Receive([COLOR="RoyalBlue"]ref[/COLOR] RemoteIpEndPoint);[/SIZE]
[/SIZE]
[SIZE=2][COLOR=#008000] // Make a new instance of the outgauge packet and then[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000] // marshall it to a structure[/COLOR][/SIZE]
[SIZE=2][COLOR=#2b91af]OutGaugePack[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]OutGaugePacket[/COLOR][/SIZE][SIZE=2] OutPack = [/SIZE][SIZE=2][COLOR=#0000ff] new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]OutGaugePack[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]OutGaugePacket[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2]OutPack = ([/SIZE][SIZE=2][COLOR=#2b91af]OutGaugePack[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]OutGaugePacket[/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af]PacketHelper[/COLOR][/SIZE][SIZE=2].DataToPacket(Rcv_Buffer, OutPack);[/SIZE]

[SIZE=2][COLOR=#008000] // Fire the event if needed[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff] if[/COLOR][/SIZE][SIZE=2] (OutGaugeReceived != [/SIZE][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2] OutGaugeReceived(OutPack);[/SIZE]
[SIZE=2] }[/SIZE]
[SIZE=2]}[/SIZE]

Thats the 2 main methods, Or atleast should be all the info you need to know, also, Any improvment suggestions - Dont flame Help me.

E: Writing it directly to a global buffer prolly isnt such a good idea, but seen as there is only ever one packet, I dont see that it matters..

E2: vBulletin sucks as a C# ide...
Last edited by mcgas001, . Reason : Forgot the ****ing connect bit, but it still errors.... :|
mcgas001
S3 licensed
Quote from BurnOut69 :In a similar mood as James, I would also check you're not consuming more bytes than intended and thus setting the stream out of sync

Just checked that, Doesnt seem to be that neither. Bytes are coming in OK. It just seems to be waiting on the UdpClient.Receive() after anything between 1-5 packets come in(Totally random).
mcgas001
S3 licensed
Quote from JamesF1 :Without investigating further (having a crappy day, so forgive me), and without reading thoroughly, have you checked our socket isn't reaching timeout?

Doesnt appear to be, There is only about 8 seconds between starting the program then connecting and then it stoping working.
mcgas001
S3 licensed
Quote from whitford :ok thanks but i tryed to great server through game but none of my mates can find it but is it because im sharing my internet connection of 8mb with 1 othr peson thanks

If your sharing your connection then no doubt you have a router. If thats the case, 99.99% of the time the reason people wont be able to see the server is that its being blocked by the router. If you check the_angry_angels sig, Theres a link to setting up servers there. It might help you
mcgas001
S3 licensed
Quote from mkinnov8 :In that case..

Ive had ideas for a concept for ages, but havent a clue how to even start to think about it.. If you can impliment any of this.. would be fantastic

You know, You should post that in program/InSim requests. Id be inrested in doing that
Last edited by mcgas001, .
OutGauge: Inconsistant data?
mcgas001
S3 licensed
Hello, I seem to be having a little problem with OutGauge and i need some assistance . Im using .Net UdpClient to connect to OutGauge( as a pose to System.Net.Sockets.Socket ). My problem is, I receive a few packets and then the socket just "hangs". Look at the attached picture. I clicked Connect on the win form, In the Debug display at the bottom it received 3 packets detailing that i was in a XRR. As you know that should be consistant. The line it seems to be stopping on is the followng...

[SIZE=2]
Bffr = Client.Receive([/SIZE][SIZE=2][COLOR=#0000ff]ref[/COLOR][/SIZE][SIZE=2] RemoteIpEndPoint);
[/SIZE]

The code before that, (RemoteIpEndPoint):

[SIZE=2][COLOR=#2b91af]IPEndPoint[/COLOR][/SIZE][SIZE=2] RemoteIpEndPoint = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]IPEndPoint[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].Any, 21000);
Bffr = Client.Receive([/SIZE][SIZE=2][COLOR=#0000ff]ref[/COLOR][/SIZE][SIZE=2] RemoteIpEndPoint);
[/SIZE]

Now, To my knoledge that should work, but for some reason it doesnt. Any help would be much appreciated
Last edited by mcgas001, . Reason : Forgot picture :|
mcgas001
S3 licensed
Quote from mc906 :sounds kinda like the CTRA X System

How?!!?
mcgas001
S3 licensed
Quote from DarkTimes :Sorry, I don't understand German compiler errors.

mcgas001
S3 licensed
Quote from mkinnov8 :Would there be any way of making it so the order of the track's is random, not known until the next restart happens?

Cheers

Thats exactly what it does? It will pick a random track from any of the specified tracks in setup.txt and then set it when the time comes.
mcgas001
S3 licensed
Quote from dougie-lampkin :I thought the XY origin was the back left corner of the car?

Mind if i ask what planet your on today? That would make no sence what so ever. Its smack bang in the middle of the car so that they are more acurate.

---

One thing i reccomend when working with LFS X,Y,Z is converting them down to smaller values, Make them meters and they will be easier to work with.
mcgas001
S3 licensed
The "Track" command can be accessd by anyone on the server to find infomation out about the race. The rest of the commands will only work for people specified in setup.txt. Its also not always '!' it will be whatever people select in setup.txt.

E: I see what threw you off thinking it was an admin only command. Hmmm...prehaps i should move that.
mcgas001
S3 licensed
Well, Making a thread wasnt such a good idea. If the person has proof i'd reccomend emailing the devs.

E: Also what xaotik said.
mcgas001
S3 licensed
I was on the server at the time. All that was happening was extreme lag. If thats the case it was truly hacked. It could have been a simple DoS attack or something similar. That said, I really dont think it was hacked i just believe it was server issues.
mcgas001
S3 licensed
Well, If Shaun can get the source to me, Ill add a config file and make the admin pass and insim port load from that.
mcgas001
S3 licensed
Quote from Dygear :And look at all of the things you have done for the community in that time. Glad to see your sticking around .

LOL, Really? Like what?
mcgas001
S3 licensed
How do you propose people run this program? Theres no way to edit InSim port and admin password.
FGED GREDG RDFGDR GSFDG