Hi, I'm trying to get some info written to a text file but I always get the following exception:
PHP Code:
2018.01.06 21:11:00.399 suspicious plugins behavior in plugin file: 'E:\TH\Plugins\User\TestPlugin.cs': possibly trying to access the disk.
At first, I thought this was because I was trying to use File.Open and writeline. So I decided to look how it worked with the ParagonCapture plugin and noticed there's already the method Hud.TextLog.Log, but I still keep getting the same exception.
Can someone tell me what's wrong with this plugin?
PHP Code:
using System;
using Turbo.Plugins.Default;
namespace Turbo.Plugins.User
{
public class TestPlugin : BasePlugin, INewAreaHandler, ISnoArea
{
public TestPlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
}
public void OnNewArea(bool newGame, ISnoArea area)
{
if (area.IsTown)
{
Hud.TextLog.Log("areatest", area.NameLocalized);
}
}
}
}