SharpMod.Message.WriteString C# (CSharp) Method

WriteString() public static method

Writes a string value into the buffer. If the string is too long and would result in a message overflow, it will be truncated.
public static WriteString ( string val ) : void
val string /// A ///
return void
        public static void WriteString(string val)
        {
            if (val == null) {
                return;
            }
            #if DEBUG
            messageInformation.Arguments.Add(new MessageArgument(typeof(string), (string)val));
            #endif
            if (count + val.Length >= MaxLength) {
                MetaModEngine.engineFunctions.WriteString(val.Substring(0, count+val.Length-MaxLength-1));
            } else {
                MetaModEngine.engineFunctions.WriteString(val);
            }
        }