-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
SQL_Callback Error: Incorrect string value #57
Comments
Duplicate Issues: #24 I'm leaving it open just to see if I can solve it and post the feedback here. |
Link to alliedmodders/sourcemod#1150 |
Your name buffer is too small which leads to truncation of the name. If the name contained unicode multibyte characters and the last unicode character is cut off mid-bytes, you get the unicode errors reported above. Strings in SourcePawn are just character/byte arrays where one unicode character uses multiple bytes. There is API to check that if you ever need it - as you already use in that Use And increase your database schema's name field to 128 as well to be safe. CS:GO was the first game to increase the buffer size from 32 characters to 128 to support up to 32 unicode characters => 32*4. I'm not sure if they restrict the name to max. 32 ascii chars or allow longer names, but you can test that quickly. @Wend4r I've already tried to hint at a possible truncation problem in the issue you linked above. I see that the original reporter was sent from here - please consider reporting problems in SourceMod with your plugins yourself instead of proxying through a user of yours. We could have solved this 2 years ago! 🍻 |
@peace-maker, realized there might be a case where the last character becomes invalid due to byte truncation. Size 32 was written with the idea of other Source games in mind, but in CS:GO it's bigger. Thank you for your explanation. |
Change the nickname size from 32 to MAX_NAME_LENGTH (Issue #57)
Change the nickname size from 32 to MAX_NAME_LENGTH (Issue #57)
@crashzk, please test 3.1.7 Beta 1 |
I will be testing and returning with feedback. Curiosity, I just update the plugin and test it, or would it be better to delete the Levels Ranks tables and start from scratch? |
Not obligatory. Core itself will change the column varchar size for MySQL type work |
@Wend4r forgot to send the compiled and when I try to compile the following error:
|
@Wend4r I sent it and so far the problem still remains:
Table apparently updated, but the error continues. I will check if after a reset in the database the problem continues. Another thing I noticed, but I don’t know if it has to do with this problem, is that players that enter the nickname invisible, characters invisible rank doesn’t save their data, keeps showing the following message to them when they try to use any LR command:
This error only stopped after he put a valid nickname on the stea and reconnected the server. |
(╯°□°)╯︵ ┻━┻ |
Means |
No, you should start debugging this first. Logging the failing queries which contain the name might be a good start. If you have a short reproducible test case you're welcome to reopen that issue. |
I am resetting the database, and even deleting all of the table that has an empty name, the problem still occurs:
Seeing the database there are no more character errors in the names of the players, everyone is right and they appear as they wrote. I haven't tested it with the characters of this type: I will use some of these characters to test and see if that would be the problem. |
@Wend4r apparently I identified the problem, players that use nick with characters, Player connected with this nick he did not have access to the rank and did not even update his rank, he tried to use the command
Even leaving emojis just doesn't work, it was only when he wrote the normal nickname, You can't even have emojis from what I noticed. Any way to fix this? |
or enter |
Ok, I changed:
I will be testing and returning with feedback. |
Just passing to leave the feedback, even changing the cvars mentioned above, be it 0 or 1 the error still continues.
|
@crashzk any news? I has the same for months now but it barely occurs since there is not much player with special characters and emojis |
@Erik-97 problem still occurs with me, I tried everything mentioned in this issues and others and nothing. As said, problem is with nicks with special characters and emojis, solution I found now would be to send these players to change nicks and even force the change of nicks if necessary. Also, if they connect with these buggy nicks, these errors still occur for them:
I believe just waiting for a fix. |
@crashzk this worked for me |
I will try here and return with the result. [EDIT1]
In the MySQL database everything was set to |
Just to leave an updated feedback. So far the configuration in the settings.ini file:
Solved my problem, no more error logs regarding it. I believe it can be marked as resolved. In any case I will be leaving it open in case someone continues to receive an error even with this change. |
Doubt, I'm using the latest version of Levels Ranks Core that is on GitHub:
Full list of the plugin and modules I use:
I am always getting this error:
Any way to fix this? What can it be?
I have already completely deleted the tables and created the databases again and nothing to solve the problem.
The text was updated successfully, but these errors were encountered: