public static void SendScriptErrors(Client client) { int i = 1; TcpPacket packet = new TcpPacket("scriptediterrors"); packet.AppendParameter(ScriptManager.Errors.Count.ToString()); foreach (var Err in ScriptManager.Errors) { var errorMessage = Err.GetMessage(); if (Err.GetMessage().ToLower().Contains("not a valid win32") == false) { packet.AppendParameters(i.ToString(), Err.Location.GetLineSpan().StartLinePosition.Line.ToString(), "false", errorMessage); i += 1; } } packet.FinalizePacket(); Messenger.SendDataTo(client, packet); }