Space Engineers

Space Engineers

Oxygen Sensor (Works in Vanilla SE - No mods needed)
Line 47 Error
Help!! The system is down with and error on line 47. I get an error that states "Line 47 : 'Sandbox.ModAPI.Ingame.IMyGridTerminalSystem' does not contain a definition for 'BlockGroups' and no extention method 'BlockGroups' accepting a first argument of type 'Sandbox.ModAPI.Ingame.IMyGridTerminalSystem' could be found ,are you missing a using directive or an assembly reference?". Here is that section of code.

// Method for finding block groups
List<IMyTerminalBlock> GetBlocksFromGroup(string group) {
var blockGroups = new List<IMyBlockGroup>();
blockGroups = GridTerminalSystem.BlockGroups;
for (int i = 0; i < blockGroups.Count; i++) {
if (blockGroups.Name == group) {
return blockGroups.Blocks;
}
}
throw new Exception("GetBlocksFromGroup: Group \"" + group + "\" not found");
}

Please help if u can tell me what is wrong in my code or if it is something i didn't name right!!
< >
Näytetään 1-3 / 3 kommentista
saxel 2.11.2015 klo 17.39 
Apparently a change was made at some point to the Grid.Terminal.System thingie.
replace the line
blockGroups = GridTerminalSystem.BlockGroups;
with
GridTerminalSystem.GetBlockGroups(blockGroups);
and that should fix it up.
ok ill try it and let you know.
that worked! Thank You!
< >
Näytetään 1-3 / 3 kommentista
Sivua kohden: 1530 50