English Include ';' in hudtxt

5 replies
Goto Page
To the start Previous 1 Next To the start
01.05.19 08:52:17 pm
Up
Goo
User
Offline Off
I can't make the ';' char appear in my hudtxt, I've even tried using '\59' to see if it's because of Lua.

I assume there's a reason to it?

EDIT:
I think I know what it's for:
hudtxt id;text;x;y...

Is there a workaround to showing it? I specifically need it to show a semicolon.
01.05.19 09:04:56 pm
Up
DC
Admin
Offline Off
I assume you're using Lua with cs2d lua cmd parse? Or a wrapper script which internally uses parse? Please read the description of cs2d lua cmd parse. You can set the optional Stop-At-Semicolon parameter of cs2d lua cmd parse to 0 to prevent that behavior.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
01.05.19 09:14:07 pm
Up
Goo
User
Offline Off
I think that HUDTXT stops at semicolon on it's own, it happens in the console as well.

Try typing
hudtxt "5" "test;50;50"
in the console.


Edit: So will this be fixed? Or will there be an alternative way of using semicolons normally?
edited 1×, last 03.05.19 10:52:54 am
03.05.19 08:02:46 pm
Up
DC
Admin
Offline Off
Can't tell. Had no time to investigate that further.

CS2D has UTF-8 support. See cs2d lua cmd parse
Maybe it works when you encode the semicolons with UTF-8? Not sure.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
04.05.19 07:42:27 pm
Up
Goo
User
Offline Off
That doesn't work, the problem is with the HUDTXT command itself, for some reason it accepts semicolons as a way to separate parameters.
04.05.19 09:47:38 pm
Up
Fraizeraust
Moderator
Offline Off
One plausible reason would be that when the
text
parameter of cs2d cmd hudtxt has the semicolon in the memory buffer, the semicolon as well as the string after the semicolon gets truncated and left out only as garbage regardless of Stop-At-Semicolon being disabled. For the record, I can print the semicolon between strings just fine on cs2d lua cmd msg and cs2d lua cmd msg2.

There's nothing that we can do other than for user DC to check the source code and bisect the said buffer pointed by
text
to see if the data is passed correctly as it should.
To the start Previous 1 Next To the start