Skip to content
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

[Bug]: PrintToChat (colored) issue in latest dev build #2263

Open
4 tasks done
ClaudiuHKS opened this issue Feb 18, 2025 · 2 comments
Open
4 tasks done

[Bug]: PrintToChat (colored) issue in latest dev build #2263

ClaudiuHKS opened this issue Feb 18, 2025 · 2 comments
Labels
Bug general bugs; can be anything

Comments

@ClaudiuHKS
Copy link

ClaudiuHKS commented Feb 18, 2025

Prerequisites

  • I have checked that my issue doesn't exist yet in the issue tracker

Operating System and Version

Windows 11 27788.rs_prerelease.250131-1609

Game / AppID and Version

L4D2 (appid 550 client, appid 222860 server); Version 2.2.4.3 (left4dead2); Network Version 2.1.0.0; Exe build: 14:34:57 Jan 16 2025 (9477) (550)

SourceMod Version

1.13 - build 7200

Metamod:Source Version

2.0 - build 1327

Version Verification

Updated SourceMod Version

1.13 - build 7200

Updated Metamod:Source Version

2.0 - build 1327

Description

PrintToChatAll("\x001White \x004Orange"); doesn't seem to work anymore with the latest SM dev build (chat message not printed at all). But it worked properly last months with a few older SM builds. \x1 and \x4 are working but if I am trying to output \x4Binary it will take the color as \x4B and I don't want that. There is also a way to PrintToChatAll("\x1White \x4%s", "Binary"); that works nice however it's going to require tons of args and I don't like the idea.

Steps to Reproduce

No response

Relevant Log Output

@ClaudiuHKS ClaudiuHKS added the Bug general bugs; can be anything label Feb 18, 2025
@Kenzzer
Copy link
Member

Kenzzer commented Feb 18, 2025

Could you test out if trying a build prior to #2255 fixes your issue ? That's version 1.13.0.7197 or earlier, and if your issue does go away, try version 1.13.0.7198 and see if it breaks again.

@ClaudiuHKS
Copy link
Author

ClaudiuHKS commented Feb 18, 2025

1.12.0-git7162 (3bc55e6) is latest working build. Since 1.12.0-git7163 (0a6fa10), trying to print "\x001Hi,\x004 Orange" won't print anything. As download link, I used https://sm.alliedmods.net/smdrop/
I am not sure if the problem is compile.exe/spcomp.exe related or sourcemod_mm.dll or other modules.

Edit: Looks like latest VS for C/C++ allows now up to 4 digits/A-F after the \x prefix. If specified less than 4, the following A-F-starting words will be messed up (if no space between \x4 and the word).

Image

Edit: Found alliedmodders/sourcepawn@20a28c6#diff-3333d1260ba153b3897c84af7ea3bbdb955bb50f7a79783a9ad51f728717a86fR2138 ; So I get that older edition took up to 3 digits, actual edition up to 2, but C/C++ allows up to 4. Anyways, it's up to you to decide a correct limit. Started this issue because I didn't know at first what really happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug general bugs; can be anything
Projects
None yet
Development

No branches or pull requests

2 participants