[Bug]: PrintToChat (colored) issue in latest dev build
Prerequisites
- [x] 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
- [x] I have updated SourceMod to the latest version and the issue persists
- [x] I have updated SourceMod to the latest snapshot and the issue persists
- [x] I have updated Metamod:Source to the latest snapshot and the issue persists
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
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.
1.12.0-git7162 (3bc55e68) is latest working build. Since 1.12.0-git7163 (0a6fa105), 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).
Edit: Found https://github.com/alliedmodders/sourcepawn/commit/20a28c6a289853a85058b3e30298fda288cab11f#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.