Fix NullReferenceException on start.
This commit is contained in:
@ -44,6 +44,7 @@ namespace RageCoop.Client
|
||||
/// </summary>
|
||||
public Main()
|
||||
{
|
||||
Settings = Util.ReadSettings();
|
||||
Logger=new Core.Logging.Logger()
|
||||
{
|
||||
LogPath="Scripts\\RageCoop\\RageCoop.Client.log",
|
||||
@ -74,7 +75,6 @@ namespace RageCoop.Client
|
||||
}*/
|
||||
SyncedPedsGroup=World.AddRelationshipGroup("SYNCPED");
|
||||
Game.Player.Character.RelationshipGroup.SetRelationshipBetweenGroups(SyncedPedsGroup, Relationship.Neutral, true);
|
||||
Settings = Util.ReadSettings();
|
||||
Networking.Start();
|
||||
#if !NON_INTERACTIVE
|
||||
#endif
|
||||
|
@ -11,9 +11,7 @@ namespace RageCoop.Client.Scripting
|
||||
{
|
||||
internal class Engine : Core.Scripting.ScriptingEngine
|
||||
{
|
||||
public Engine() : base(typeof(ClientScript), Main.Logger)
|
||||
{
|
||||
public Engine() : base(typeof(ClientScript), Main.Logger) { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
20
Server/Scripting/Engine.cs
Normal file
20
Server/Scripting/Engine.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RageCoop.Core.Scripting;
|
||||
namespace RageCoop.Server.Scripting
|
||||
{
|
||||
internal class Engine:ScriptingEngine
|
||||
{
|
||||
public Engine() : base(typeof(ServerScript), Program.Logger)
|
||||
{
|
||||
|
||||
}
|
||||
public static void Load()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -72,8 +72,8 @@ namespace RageCoop.Server
|
||||
}
|
||||
else
|
||||
{
|
||||
Program.Logger.Error("Port forwarding failed! Your router may not support UPnP.");
|
||||
Program.Logger.Warning("If you and your friends can join this server, please ignore this error or set UPnP in Settings.xml to false!");
|
||||
Program.Logger.Warning("Port forwarding failed! Your router may not support UPnP.");
|
||||
Program.Logger.Info("If you and your friends can join this server, please ignore this error or set UPnP in Settings.xml to false!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,7 +203,6 @@ namespace RageCoop.Server
|
||||
Program.Logger.Error(e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
|
||||
Program.Logger.Info("Searching for client-side files...");
|
||||
DownloadManager.CheckForDirectoryAndFiles();
|
||||
|
||||
|
Reference in New Issue
Block a user