Long messages [128 char +]
#1

well messages get cut because they to long, but they to long, because i add color ({00FF00}) to the message.

i would like to know how to increase this number or limit.

Help = rep+
Reply
#2

The max lenght of client messages is 128. The only thing I can think of is splitting the message.
Reply
#3

The only way I can see of getting around this is by splitting the message too.

What I do on my server is when someone's message is about 100characters long, i split it and store it in another string. Then I send out the first message and then the second message.

>Though if the message is less than 100characters long; I don't split the message.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The max lenght of client messages is 128. The only thing I can think of is splitting the message.
yeah, i thought of that, but it's gonna look gay, i will have to try and make it shorter.
Reply
#5

use strcat
Reply
#6

I think your question has been answered now. There is no way around it unfortunately; either make your message shorter then the client text limit or split it up.
Reply
#7

Quote:
Originally Posted by xganyx
Посмотреть сообщение
use strcat
How strcat would be useful in his case?

Quote:
Originally Posted by SA-MP Wiki
This function concatenates (joins together) two strings into the destination reference.
It does the opposite of what he actually wants to do.
Reply
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
Actually, it's 144, but the general advice still applies - split the message up over multiple lines.
so, it 144.... omg, thank you bro, i always thought it max was 128.
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
It might be better to split the message up if it is greater than 100 characters, unless it is less than 144. I know that seems odd, but there is logic to that. Your way, a message 101 characters gets split up despite being able to fit on one line, and only 1 character goes on the new line. Splitting up over 144 has the same problem with messages 145 characters long. However, if you split at 100 when the message is over 144, then for 101 and 144 you just use one line, but for 145 you use two lines, with the first line being 100 characters and the second being 45 - a much more even split to look much less silly IMHO. Or look for the first space after character 100 to split at.

In fact, now that I've thought of this, I want to implement it myself!
Hehe The way my system works right now is that I split the message at 100 because I want to send the message to everyone with the players name and an appropriate chat tag.
So:
pawn Код:
STRING[128] is combined of roughly MESSAGE[100]+MAX_PLAYER_NAME+CHATTA[ASIZEHERE] (EG: [OOC]).
I would like to know though; how is the max client message 144? I've always thought it to be 128 and I think most others do too

It would be awesome if you could inform me
Reply
#10

Because almost everyone (ignore those with 256) uses a lenght of 128 in messages and this is what SA-MP Wiki also says: https://sampwiki.blast.hk/wiki/Limits

Quote:

Note the 'text I/O' value - that is for the text that is sent to the client, and that is used on OnPlayerCommandText.

Text I/O 128 cells (512 bytes)

I used another resolution and I could see 143 characters!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)