PHARTGAMES / SpaceMonkey

MIT License
44 stars 10 forks source link

Craches after successfully finding the car in wreckfest. No sign of spacemonkey service. #4

Closed alvess2 closed 3 years ago

alvess2 commented 3 years ago

Same with Dirt5.

PHARTGAMES commented 3 years ago

Thanks i'll check it out

PHARTGAMES commented 3 years ago

When SpaceMonkey crashes does it give you an exception window?

If not can you look in the event viewer for the crash and tell me what exception you are seeing.

I tried wreckfest and dirt5 here and they are both working as normal. Perhaps there was an issue with the last release.

Maybe try again in v1.0.4

alvess2 commented 3 years ago

Found it. You need to specify the invariant locale when using float.Parse() here:

https://github.com/PHARTGAMES/SpaceMonkey/blob/960660fb0970b7e64132a91e0a440e60b20ed8c5/CMCustomUDP/CMCustomUDPData.cs#L237

Here is an example: https://stackoverflow.com/a/147811

The packet format scale value contains a dot '.' but my locale requires a comma ',' instead.

It is possible to set the locale for the entire thread as well. And possibly for the entire application.

PHARTGAMES commented 3 years ago

Ahh legend, thanks

I have ran into this issue before on another project..

CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; at startup should be the fix.

I'll put that in for the next release :)

PHARTGAMES commented 3 years ago

Fixed in Revision #75