CTFBot.Program.getFormatMessage C# (CSharp) Method

getFormatMessage() public static method

Get a message from the msgs store, and format it using the parameters specified. Messages should be those with a "1" prefix, incompatible with CVUBot.
public static getFormatMessage ( int msgCode ) : string
msgCode int The five-digit message code
return string
        public static string getFormatMessage(int msgCode, params String[] fParams)
        {
            try
            {
                string message = (string)msgs[msgCode.ToString().PadLeft(5, '0')];
                return String.Format(message, fParams);
            }
            catch (Exception e)
            {
                logger.Error("Cannot getFormatMessage " + msgCode.ToString(), e);
                return "[Error: cannot get message]";
            }
        }