Open WLink-0 opened 1 year ago
Add TaskScheduler.UnobservedTaskException Event to TShockAPI (i added this on TShock.cs) or use a plugin with it (SEconomy for example)
Hello! Can you elaborate on this part? what code did you add?
I added this on initialize part of tshock.cs
TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
protected void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
{
if (e.Observed == true)
{
return;
}
TShock.Log.ConsoleError(e.Exception.Flatten().ToString());
e.SetObserved();
}
And this on dispose
TaskScheduler.UnobservedTaskException -= TaskScheduler_UnobservedTaskException;
EDIT: This error started to show up when i updated to tshock 5, it never happened to me before. Here is some images of where i put the code
Reproduction steps (if applicable)?
Any stack traces or error messages (if known)?
Any log messages from files that end in
.log
or.txt
? What are the last 100 log messages from the server console?2022-11-24_02-21-01 (with DebugLogs set to true).log 2022-11-24_02-19-02.log
What plugins and what versions of those plugins are you running?
Only TShockAPI, no other plugins.