PDA

View Full Version : Variable to long for OSD?



doGman
April 1st, 2004, 09:38 PM
I wanted to display a long text (>600 chars) using an OSD. With the build in Simple OSD all is working fine, but not with OSD PopUp and XP OSD. Both display only about 500 chars and cut the rest! I tried to:
- trigger an event with payload,
- split the variable into two payloads (pld1, pld2)
- using a global variable
All without success. Is this possible, that Girder is cutting long variables sent to external plugins or is there a solution for it?

Promixis
April 2nd, 2004, 04:07 AM
You can use lua to split strings using the strsub command.


s = "long string"
s1 = strsub (s,1,strlen (s)/2)
s2 = strsub (s,strlen (s)+1,-1)

doGman
April 2nd, 2004, 04:21 AM
Thanks, but as I wrote in my first post, I've already tried it:

- split the variable into two payloads (pld1, pld2)

It seams to be another problem (I hope it's not banal and I just don't get it...).

Promixis
April 2nd, 2004, 04:43 AM
So whats happening when you split the strings and try and output them?

Mark F
April 2nd, 2004, 05:00 AM
OSD Popup is limited to 500 characters in a variable to display. This is due to the size of an array that is passed to Girder to get the parsed variables.

Promixis
April 2nd, 2004, 05:06 AM
Thanks Mark :)

doGman
April 2nd, 2004, 05:48 AM
OSD Popup is limited to 500 characters in a variable to display. This is due to the size of an array that is passed to Girder to get the parsed variables.

Aha.
Is this limited by Girder or did you limit it in your plugin? Because XP OSD has the same limitation while Simple OSD does not have it...

Mark F
April 2nd, 2004, 06:04 AM
It is in the plugin.

BeRnA
April 2nd, 2004, 07:52 AM
When I notice about this limitation in OSD XP, I email the author about that and he said that was a Girder limitation, said nothing in hist plugin was limiting the string...

Mark F
April 5th, 2004, 04:46 AM
Altering the OSD Popup plugin to have a much larger array size, I have successfully used string variables that are larger than 1K.

doGman
April 26th, 2004, 07:49 AM
Mark F, will you release the altered version and if not, is there a problem as areason for the limitation?