![]() |
|
|
|
#1
|
|||
|
|||
|
Thank you very much! Will try to install it tonight.
|
|
#2
|
|||
|
|||
|
All messages work finally (in Russian at least)! Runs on Repka 2 now. Thank you very much!
|
|
#3
|
|||
|
|||
|
What these errors can be related? Just had server launcher crash some time after these errors.
Code:
[21:44:59] [21:44:59] ================================================= [21:44:59] System.NullReferenceException: Object reference not set to an instance of an object. [21:44:59] [21:44:59] Server stack trace: [21:44:59] at Mission.OnPlaceLeave(Player player, AiActor actor, Int32 placeIndex) [21:44:59] at maddox.game.ABattle.OnPlaceLeave(Player player, AiActor actor, Int32 placeIndex) [21:44:59] at maddox.game.ABattle.OnEventGame(GameEventId eventId, Object eventArg0, Object eventArg1, Int32 eventArgInt) [21:44:59] at maddox.game.world.Strategy.OnEventGame(GameEventId eventId, Object eventArg0, Object eventArg1, Int32 eventArgInt) [21:44:59] at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [21:44:59] at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [21:44:59] [21:44:59] Exception rethrown at [0]: [21:44:59] at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [21:44:59] at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [21:44:59] at maddox.game.IBattle.OnEventGame(GameEventId eventId, Object eventArg0, Object eventArg1, Int32 eventArgInt) [21:44:59] at maddox.game.GameDef.eventGame(GameEventId eventId, Object eventArg0, Object eventArg1, Int32 eventArgInt) [21:44:59] at dp8K7ffZC2JmTFxNtum.gkydOifm2sRXchrPjNC.eventGame(GameEventId , Object , Object , Int32 ) [21:44:59] at tpZkklAJjTISdGT144j.fBZFTNAMvsuuP0ewCS3.AY6A72gxK6R(GameEventId , Object , Object , Int32 ) [21:44:59] ================================================= [21:44:59] Server: vist is now with the Blue army. |
|
#4
|
|||
|
|||
|
Nothing to do with my part,
something in OnPlaceLeave going wrong. You should test actor for null value: if (actor != null) //missing { if ((actor as AiAircraft).InternalTypeName() == "bob:Aircraft.DH82A") ... } Last edited by FG28_Kodiak; 10-12-2011 at 06:08 PM. |
|
#5
|
|||
|
|||
|
Thank you very much! It's a hard science for me, ahh...
|
|
#6
|
|||
|
|||
|
You can declare a function as:
private void sendScreenMessageTo(int army, string msg, params object[] parms) then array for the parameters will be generated automatically, the call will be easier to look: sendScreenMessageTo(myarmy, "I am at grid {0}, {1}", xpos, ypos); Also, lowercase first letter in class or function name is Java style, not C#. Microsoft C# Code Design Guidelines. |
|
#7
|
|||
|
|||
|
I use lowercase first letters for private methods and uppercase for public, thats all. And i am not interested in "Style Guidlines" from Microsoft.
And i don't use the params parameter to avoid confusion between (GamePlay) void gpLogServer(Player[] to, string format, object[] args); and my methods. btw. Welcome to the forum! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|