Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » 3.4.4 Send_Message_Player Disconnect
Re: 3.4.4 Send_Message_Player Disconnect [message #419684 is a reply to message #419306] Thu, 11 February 2010 09:38 Go to previous message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma:
General (2 Stars)

Pretty close, but again, 238 is not the limit. Depending on the color it may be larger than that. The real limit is 256, but consider the following overhead:

256 -
10 bytes default overhead
1-3 bytes for red
1-3 bytes for green
1-3 bytes for blue

The color components are sent as string, therefore 0-9 take 1 byte, 10-99 take 2 and 100-255 take 3. If you write a message in black, you will therefore have a higher "message limit". Wink

It would be safest not to send messages longer than 256-10-3-3-3 = 237 bytes. Although apparently 238 worked for you, it is not guaranteed to work in every situation, therefore you best avoid sending messages longer than 237 bytes.


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Direct Connection
Next Topic: Server Side Mods
Goto Forum:
  


Current Time: Wed Feb 12 15:23:49 MST 2025

Total time taken to generate the page: 0.01502 seconds