The online racing simulator
MSO Packet MaxChar Problem!
(10 posts, started )
MSO Packet MaxChar Problem!
Dear LFS Community,

Ive got an little problem with my InSim Application in the following text or picture ill show you my problem. I hope you understand what i mean and you can help me.

What im Using:
Langauage: C# @ Microsoft Visual C# 2010 Express
Libary: LFS_External by T-Ronx (the last one)

What i want to do:
I want to add more longer sentences on my App. if its possible.
Otherwise i need alot of Buttons.

Sorry for my bad english.

Happy New Year
Attached images
MaxCharProblem.JPG
You cant use Left or right because you have flags.buttonstyles c2
If you replace the Flags.ButtonSyles.ISB_Left with Flags.ButtonSyles.ISB_Dark or Flags.ButtonSyles.ISB_light

i think
I can use any Buttonflag

e.g

DARK | LEFT then the button is DARK and text starts on LEFT
C1 C2 C4 are just Interface collours from LFS so nothing to do with it.

That dont helped alot

But anyways Thanks that you tryed it
#4 - PoVo
Yes you can use those ButtonStyles.

The problem is LFS_External has somewhat of a bug that allows a maximum of 110~ characters (I tested this on my app) when the max allowed should be 240 chars by InSim.

The solution to this is to use a better library like Spark etc.

BTW, the problem has nothing to do with IS_MSO, it's the IS_BTN packet that's the problem.

Good luck.
-
(Heiko1) DELETED by Heiko1
Oh DAMNIT!

Thanks anyways..
Quote from Grinch :[1st post]

Suggestion: Translate the error. That way, people will have a better idea of what's going on.

Otherwise - I'd suggest using Spark too. But that's your choice, of course.

And, just wanted to say that I like this help request. No need to ask for code/language/used base. Just.. don't mind my nonsense.

[E]:
"Otherwise i need alot of Buttons."
Hint: Make a timer or something, and send them to some sort of a queue.. OR just find another way to send them with a delay (10ms between each button should be enough, I think). Sending too many buttons to a person at once might, and most likely will cause them to lose connection. Been there, done that - wasn't nice.
Hi broken thanks for that

Erm... yea with that high amount of buttons

I have at the moment the problem that many players or myself to, are losing the connection to the host.
Because ive added an timer which creates and updates the Buttons at once
eg.

55+Buttons are createt on connect.
after the first pit leave buttons update each 2Secconds ALL 50Buttons and then im sometimes losing connection

so if i split it to
1.Timer
Create 25Buttons
Update 25Buttons

2.Timer
Create the other 30Buttons
Update the other 30Buttons

that might help? if yes ill change code as fast as i can

Another question:
Does it is on high priority to DISABLE unused Event Handlers?
e.g
RST, III, VER, and so on?
does i can feel it that the insim runs smoother?

Sometimes in my InSim Log it shows :"TCP: Wouldblock"
and something with Cleared Emergency bla bla

What is that?? can i do something that it doesnt show up again ? or try to dont start that error ?

Thank you for the help @ all!
It's a good practice to remove all unused variables, handles and methods from the code. Not only will it make your code a bit faster, but it will be far less confusing and much easier to read.

The classic WOULDBLOCK error is a non-fatal one and i.e. winsock triggers this error when there is no data ready to be read on a non-blocking socket. Either way, you should take a look at your network code, LFS might send this warning if you're trying to send too much data at "one shot"...
Quote from MadCatX :[...] LFS might send this warning if you're trying to send too much data at "one shot"...

Or in this case - buttons.

Yep, splitting the buttons is a good solution. May I suggest once again a solution. When I started doing the base of my insim app, I posted it in the Spark thread. It has a button queue too.

Link: http://www.lfsforum.net/showthread.php?p=1520803#post1520803

Or you might just steal the button queue from that and use it, if you don't want to use Spark.
Wow thank you guys for the information and the Help!

Everything worked perfect what you told me

Nice Community

Happy New Year

Hope to see you soon on my/your or any other server

MSO Packet MaxChar Problem!
(10 posts, started )
FGED GREDG RDFGDR GSFDG