midspace / Space-Engineers-Admin-script-mod

Modding script for Space Engineers with dozens of Admin commands for creating game scenarios or supporting servers.
44 stars 13 forks source link

Exception in the /msg functionality #171

Closed midspace closed 8 years ago

midspace commented 8 years ago

This even occurs trying to send to self.

2016-09-16 07:50:45.649 - Thread:   1 ->  ##Mod## Admin Helper mod Exception caught. Message: System.NullReferenceException: Object reference not set to an instance of an object.
   at midspace.adminscripts.CommandPrivateMessage.SendPrivateMessage(UInt64 steamId, IMyPlayer receiver, String message)
   at midspace.adminscripts.CommandPrivateMessage.Invoke(UInt64 steamId, Int64 playerId, String messageText)
   at midspace.adminscripts.ChatCommandService.ProcessServerMessage(UInt64 steamId, Int64 playerId, String messageText)

See, as the calls are now server side. https://github.com/midspace/Space-Engineers-Admin-script-mod/blob/master/midspace%20admin%20helper/Data/Scripts/midspace.adminscripts/UserCommands/CommandPrivateMessage.cs#L195

Looks like I broke it with https://github.com/midspace/Space-Engineers-Admin-script-mod/commit/46455fedcc6895cc3f4aa9dc291374e2d178b60a#diff-e0edcd8adbd54c9be8ee852dfb01c3ff