As I try the swears on a filter but my problem is how to load them to swear list.
I used LFS External for my base.
I tried to make this..
From FileInfo.cs
From: private void Form1_Load(object sender, EventArgs e)
Form1.cs
Swears Region
Error: 7 Operator '==' cannot be applied to operands of type 'System.TypeCode' and 'int'
is my coding is wrong or just really wrong i need help
I used LFS External for my base.
I tried to make this..
From FileInfo.cs
static public byte GetSwears(string Swears)
{
StreamReader Sr = new StreamReader(UserInfo + "\\swears.txt");
string line = null;
while ((line = Sr.ReadLine()) != null)
{
if (line.Substring(0, 6) == "Swears")
{
string[] Msg = line.Split('=');
if (Msg[1].Trim() == Swears)
{
Sr.Close();
return 1;
}
}
}
Sr.Close();
return 0;
}
From: private void Form1_Load(object sender, EventArgs e)
if (System.IO.File.Exists(UserInfo + "\\penalty\\swears.txt") == false)
{
System.IO.File.Create(UserInfo + "\\penalty\\swears.txt");
}
Form1.cs
Swears Region
string SwearFilter = Msg.ToLower();
int Swears = 0;
{
if (SwearFilter.Contains (""))
{
StreamReader Sr = new StreamReader(UserInfo + "\\penalty\\swears.txt");
string TempSr = Sr.ReadToEnd();
string line = null;
while ((line = Sr.ReadLine()) != null)
{
if (line.Substring(0, 6) == "Swears")
{
string[] Msg1 = line.Split('=');
if [COLOR=Blue](Msg[1].GetTypeCode() == Swears)[/COLOR]
{
Sr.Close();
}
}
}
InSim.Send_MST_Message("/msg ^4|^7 " + Connections[GetConnIdx(MSO.UCID)].PlayerName + " was fined for swearing");
}
}
Error: 7 Operator '==' cannot be applied to operands of type 'System.TypeCode' and 'int'
is my coding is wrong or just really wrong i need help