Space Engineers

Space Engineers

Cargo Container with Fill Level Bars
lostsoul3471 3 May, 2016 @ 11:03am
Script errors and CTD on load.
Doh! Fired up the game, added the mod to an existing save and....

2016-05-03 13:43:05.854 - Thread: 1 -> Exception occured: System.DivideByZeroException: Attempted to divide by zero. at Eikester.ContainerStatus.Container.GetCurrentVolumeInPercent() at Eikester.ContainerStatus.Container.UpdateEmissive() at Sandbox.Game.Entities.MyEntities.UpdateBeforeSimulation() at Sandbox.Game.World.MySector.UpdateBeforeSimulation() at Sandbox.Game.World.MySession.UpdateComponents() at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime) 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.RunInternal(String[] args) at SpaceEngineers.MyProgram.Main(String[] args)

Hopefully it's a minor opps someplace. I've got a couple full lg cargo containers, and many many mods so it could be a conflict with something else too--nothing that tweaks 'nilla containers. Percent full calc maybe? Really cool mod tho. :)
< >
Showing 1-7 of 7 comments
Eikester  [developer] 3 May, 2016 @ 12:00pm 
thats odd
public int GetCurrentVolumeInPercent()
{
currentVolume = m_inventory.GetInventory(0).CurrentVolume.ToIntSafe();

return (currentVolume * 100 / maxVolume);
}
thats where it crashes for you but maxVolume should never be 0 o.O
Do you have any Inventory Scripts/Mods in that world?
Eikester  [developer] 3 May, 2016 @ 12:15pm 
i've updated with some changes, should no longer crash due divided by zero but something is definitely wrong in your world if maxVolume is 0 so it would be helpful if you could upload your world somewhere
Autositz 4 May, 2016 @ 9:55am 
Maybe this happens when inventory is set to unlimited or something like that?
lostsoul3471 8 May, 2016 @ 6:03pm 
I've been on vaca but he fix worked. Like I said before, I don't have anything else that mods the vanilla containers so not sure what would get botched on this. It's probable that maybe the stargate mod pack or one of {DT}'s might be the culprit wouldn't know at this point
Lex174 9 May, 2016 @ 9:44am 
Originally posted by Autositz:
Maybe this happens when inventory is set to unlimited or something like that?

Could be...
AFAIK there's no word for "unlimited" or smth like that in programming, it could be easily replaced by 0.
Autositz 9 May, 2016 @ 10:02am 
Originally posted by Skloomax:
Originally posted by Autositz:
Maybe this happens when inventory is set to unlimited or something like that?

Could be...
AFAIK there's no word for "unlimited" or smth like that in programming, it could be easily replaced by 0.
Yeah, that was my point. ;) I would use 0 to show "unlimited" space. So i thought it is set somewhere on his containers resulting in that.


Another thing just came into my mind.. and old bug...
When you split stacks.. sometimes one stays with size 0.... and the only way to get rid of it, is merging it with another stack of the same item. That bug was fixed "long" ago they said.. but i had it happen just couple of days ago when i last played. Was a 0.000000000000000x Iron Ingot stack.. could also result in a division by zero when it's rounded.. ;)
molookbaal 12 Apr, 2017 @ 7:30pm 
Hello!

I not find in this theme any strings with words "FPS" and "LAG", then is problem not expected in this theme. (sorry my english :-)

Problem:

Create new game on Earth in any mode with use this MOD.
Fly to nearest pirate base on standart fighter.
Begin LAGs with low 10-15 FPS, on distance to pirate base ~1500m.
Next maximal LAGs with 2-5 FPS on distance to pirate base ~250m.

...

Deleting this MOD return hi performance. Working... ;-)

Version 0.1.179.003
Computer 4 cores AMD FX 4100 16GB, GTX 650 Ti BOOST 2GB...
< >
Showing 1-7 of 7 comments
Per page: 1530 50