安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
Exception occured: System.NullReferenceException: Object reference not set to an instance of an object.
at Zkillerproxy.TurretMinTargetMod.smartTargetingSwitchSetter(IMyTerminalBlock turret, Boolean newValue)
at Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl`2.SetValue(TBlock block, TValue value)
at Sandbox.Game.Gui.MyTerminalControlOnOffSwitch`1.OnValueChanged(MyGuiControlOnOffSwitch obj)
at Sandbox.Game.Screens.Helpers.MyGuiControlOnOffSwitch.set_Value(Boolean value)
at Sandbox.Game.Screens.Helpers.MyGuiControlOnOffSwitch.HandleInput()
at Sandbox.Graphics.GUI.MyGuiControlBase.HandleInputElements()
at Sandbox.Graphics.GUI.MyGuiControlBlockProperty.HandleInput()
at Sandbox.Graphics.GUI.MyGuiControlParent.HandleInput()
at Sandbox.Graphics.GUI.MyGuiControlList.HandleInput()
at Sandbox.Graphics.GUI.MyGuiControlBase.HandleInputElements()
at Sandbox.Graphics.GUI.MyGuiControlParent.HandleInput()
at Sandbox.Graphics.GUI.MyGuiControlParent.HandleInput()
at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate)
at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate)
at Sandbox.Graphics.GUI.MyScreenManager.HandleInput()
at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput()
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass1.<Run>b__0()
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at SpaceEngineers.MyProgram.Main(String[] args)
Empty World with default settings and only Smart Turret Mod.
Tested Survival and Creative modes
I build always the same blocks:
1. Fighter Cockpit
2. Gatling Turret
Every time i try to enable the smart turret function my game crash.
If i save the game and reload before i hit the button it doesn't crash.
In the first case the default controls of the turret are missing.
I don't looked into your code but i think the bug is somewhere in the terminal controls initialisation.
EDIT: Sorry my bad, the default controls are not missing, they just are not at the top. Only the "Toggle Block" switch is missing.
But after saving and reloading all controls are where they should be
Is there a reason why you use a MySessionComponentBase instead of a MyGameLogicComponent for your turret logic?
This might be the problem with the crash and missing or unordered controls.
I use an intel i5 processor.
For the MyGameLogicComponent you have to add an MyEntityComponentDescriptor. I think [MyEntityComponentDescriptor(typeof(MyObjectBuilder_TurretBase), true)] is the correct one.
This is your script as GameLogicComponent without targeting stuff :D
This should initialize the TerminalControl correctly.
Only tested with vanilla turrets.