-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
% symbol is not being displayed through third party plugins on latest beta branch. #2611
Comments
#2531 is resurfacing? |
@mikela-valve the best way is just replace % and # to unicode analog. But then we can get bug with non displayed symbols on xp. |
Looks like. |
Is this only happening on CS or for other games as well? #2531 was a fix to the This might be some combination of message processing that is causing this. The Before I tightened up the |
@mikela-valve I don't have a way to test it on another game besides CS. If someone else can test it on another game that would be really helpful. |
@mikela-valve was the supposed update to the beta postponed? |
I'm just waiting on some changes to build now. I had a few more changes to make for #2237. |
Thanks, I will update this asap once the update hits the beta branch. |
Thanks, it should be updated now, build 8304. |
@mikela-valve Still not appearing with the new build 8304 |
@mikela-valve This is still happening on latest beta branch. |
Typing
Note that it prints to console twice and it adds a newline on the second print. It's also inserting another space in the second print. Normal chat text does seem to work with @basuritashka How are you sending the |
@SamVanheer client_print / client_print_color. |
Ok so that's still ending up in |
|
What happens when you type in |
@SamVanheer |
Ok, i did some checking in AMX's code, it looks like this problem is caused by how AMX interacts with the new Here are some links: AMX will format your text first before sending it, since Among other things it converts So when you pass Now we can see that a single one is still supported when entered through chat so the question is why it's being ignored. I see that I do see code to append I don't immediately see a cause of this problem but this should help @mikela-valve track things down. I'd suggest trying to send If nothing shows up after 64 i think it's safe to say it isn't caused by repeated printf calls. Now as to why it does work in the public version. In that version of the
So @Arkshine If you know of any way to log the data being sent using I think there might be a Metamod plugin that does this but i don't know if there's anything readily available to run. |
Ok, all of these explanations are starting to make sense. So, first, the reason %'s work in in-game chat is that in-game chat is first filtered and written into a temporary string that is then inserted into the chat buffer through a loc token that resolves to that temporary string. That temporary string is not used as a format string so it is not stripped of format specifiers. The reason that This can be fixed as @SamVanheer suggested by sending |
Testing with /say3color and /say4color: |
@Arkshine What's your opinion on this? Do you think this should be fixed in AMX's code? It seems like the best place to put it, since it reduces the amount of changes required to just the implementations for those message sending functions. |
I did not really follow the last changes lately. I remember vaguely I wanted to use |
@mikela-valve says you can send two strings, |
@Arkshine Currently what @SamVanheer is describing is for |
I'm also not sure why @basuritashka's last test printed two %'s. I looked through the AMXX code and everything looked like it worked the way that I thought it would, i.e. |
That's why it would be very helpful to see what was actually sent to the client once the string made it through AMX's code, so we can see what exactly is getting received. I'm not aware of any plugin that actually does this, however. |
@Arkshine This is being tested on latest beta branch. |
I know, I tested on latest stable and beta. I'm just concerned how you see % on the stable version when in my test it doesn't appear. But I guess it doesn't matter since eventually the beta will be moved to the stable branch. |
Oh okay, I just misunderstood your comment thinking it was related to actual AMXX builds (1.9 - 1.10). |
@Arkshine The I also checked out why the extraneous newlines were being shown in the console. Are there embedded newlines in the string arguments being passed to |
@mikela-valve Thanks, much appreciated. About the newline, it seems historically AMXX has always appended a new line before sending msg[len++] = '\n'; // Client expects newline from the server Old code. I can't really say if it was necessary. Is it still needed now? If it's safe, then I don't mind removing it. |
Yep, I don't think that's necessary anymore. The message string from |
|
This comment has been minimized.
This comment has been minimized.
New lines are still allowed in the middle of a string. It doesn't happen with Is something can be done for |
Not sure if related but a empty space is created when using client_print_color and sometimes a couple of strings (via console_print) will get merged into a single one (look at the "space" text) Note that console_print was used as:
(That should be enough to test that) There is also a problem with how % is getting displayed through print_center. (Cannot confirm this) |
@basuritashka AMXX inserts by default a newline. For |
@Arkshine Unfortunately without examining all of the translation strings I can't remove that newline stripping as I'm unsure of what in the game resources might unknowingly have them. It looks like the same single newline stripping is done to all four of the string inputs, could you double the newline on any string args passed through to |
Alright. I can double the newline, it's not that dramatic. Thanks for answering. |
@Arkshine Multiple console_print in the same function are not getting displayed correctly, is that related? Because when using more than 1 console_print in the same function the game will just release a single string with everything merged on it. (Look screenshot from latest post from me) |
@mikela-valve Sorry to bother you again. Just tested Also, under CS, with |
It looks like DoD doesn't currently support that through For CS, are you referring to stripping of newlines in the format string or the message args? |
@Arkshine print_center is also displaying %s on CS NS version, I know it is not supported here but its worth mentioning. |
@mikela-valve E.g.
|
I guess I will have no choice to check mods and use message args only for the official ones. 😩 |
@Arkshine It looks like Were ordinary newlines working for |
For CS, with or without format string, |
@Arkshine I've been looking back through the changes for It looks like all of the other modes of |
The Linux CS I reported does not have 'console' Carriage Return phenomenon while OP4 does. Matching Amxx 5260 ⌘773. Buffalo, New York. 5263 Resolves this. Thank you. |
Title.
Beta:
%d%% ->[100 ]
Stable version:
%d%% ->[100%]
The text was updated successfully, but these errors were encountered: