Re: Need help with File.ReadAllText
Posted: 09 Jul 2013, 18:11
You forgot one important piece of your url....
http://
http://
The first free minecraft classic server software that offers fully functional lava survival mode. Enjoy!
http://mcdzienny.cba.pl/
string content = new System.Net.WebCient().DownloadString(URL);
try
{
string content = new System.Net.WebCient().DownloadString(URL);
}
catch
{
Player.SendMessage(p, "An error occurred retrieving server news.");
}
Leeizazombie wrote:Hmm perfect! Thanks guys!
Leeizazombie wrote:Oh one more thing, is there a possible way to use something like File.ReadAllLines in the webclient version?
Hello welcome to my server$Please read the rules$You can type /rules$Also check out the /help menu
public override void Use(Player p, string message)
{
try
{
string content = new System.Net.WebClient().DownloadString("http://conor.com/news.txt");
foreach(string line in content.Split('$'))
{
Player.SendMessage(p, line);
}
}
catch
{
Player.SendMessage(p, "Error getting news.");
}
}