1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

[Solved] Need Help with Visual Studio

Discussion in 'Programming Questions and Suggestions' started by Jaron Swofford, Jul 22, 2020.

  1. Jaron Swofford

    Jaron Swofford Trainee Engineer

    I have Visual Studio 2019 Installed, and the MDK Installed.

    If I do anything with the GridTerminalSystem object it always returns null, and causes an exception.

    Even Simply adding this line to my Main method will throw the exception.

    I can't find an answer anywhere, my google fuu is failing and I tried searching for a forum post mentioning something like this, but I am coming up short.

    Do I not have my IDE setup correctly?

      Message=Object reference not set to an instance of an object.
      at IngameScript.Program.Main(String argument, UpdateType updateSource) in C:\Users\<User>\source\repos\Light-Finder\Program.cs:line 34

    My code is simply as follows.
    using Sandbox.Game.EntityComponents;
    using Sandbox.ModAPI.Ingame;
    using Sandbox.ModAPI.Interfaces;
    using SpaceEngineers.Game.ModAPI.Ingame;
    using System.Collections.Generic;
    using System.Collections;
    using System.Linq;
    using System.Text;
    using System;
    using VRage.Collections;
    using VRage.Game.Components;
    using VRage.Game.GUI.TextPanel;
    using VRage.Game.ModAPI.Ingame.Utilities;
    using VRage.Game.ModAPI.Ingame;
    using VRage.Game.ObjectBuilders.Definitions;
    using VRage.Game;
    using VRage;
    using VRageMath;
    namespace IngameScript
    	partial class Program : MyGridProgram
    		public Program()
    		public void Save()
    		public void Main(string argument, UpdateType updateSource)
    --- Automerge ---
    I found my Answer. The GridTerminalSystem needs to be prepoluated, with a mockup.
    Last edited: Jul 29, 2020