SA-MP Forums Archive
SendClientMessage string length bug? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SendClientMessage string length bug? (/showthread.php?tid=357708)



SendClientMessage string length bug? - Tee - 08.07.2012

There's a problem where the max length of strings passed by SendClientMessage, for me is 142. Anything above that won't be shown in the server, I printed out the actual message which is 153 characters in length. Anyone has/had this experience?


Re: SendClientMessage string length bug? - SnG.Scot_MisCuDI - 08.07.2012

Yeah actually. It used to happen when i did a pm command it would cut off the middle of the message but the string length was longer


Re: SendClientMessage string length bug? - Tee - 08.07.2012

Hmmm okay, anyone else?


Re: SendClientMessage string length bug? - [KHK]Khalid - 08.07.2012

True but not sure about the length you mentioned. You could split them up though.


Re: SendClientMessage string length bug? - Blacklite - 08.07.2012

not a bug - it's well documented.


Re: SendClientMessage string length bug? - ReneG - 08.07.2012

The max length that can be shown on one line of a client message is 128, anything after that gets cut off.


Re: SendClientMessage string length bug? - Tee - 08.07.2012

Yea I know that but the message doesn't show at all. Okay, here's what happens. I have a message that's 143 characters long, it doesn't show the first 142, it doesn't show anything at all, I remove one character (leaving 142) now the message shows.


Re: SendClientMessage string length bug? - Tee - 08.07.2012

Bump. Anyone else with the same problem?


Re: SendClientMessage string length bug? - Tee - 08.07.2012

I know the line limit is 128 characters. Okay, here's what actually happens:
pawn Код:
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken limbs. Take him to the");//doesn't print
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken limbs. Take him to");//doesn't print
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken limbs. Take him");//doesn't print
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken limbs. Take");//prints
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken limbs.");//prints
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few broken");//prints
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a few");//prints
SendClientMessage(playerid,Grey,"A man of unsound mind fell from the top of a billboard in Blackfield Intersection and suffering from a concussion and a");//prints
What could possibly be the problem?


Re: SendClientMessage string length bug? - iggy1 - 08.07.2012

I wonder if the same happens with SendPlayerMessage they might have different max lengths, due to not having to send a player name. (At the risk of sounding a bit stupid OFC) Can't test it myself right now.