Solar Calculator


Adds a solar power calculator that can calculate how much power your solar panels provide on average. Or calculate how many panels and accumulators you need to provide the desired power. Supports modded panels and accumulators, quality and DLC planets (future Space Exploration update to 2.0 most likely won't work)

Utilities
a month ago
1.0 - 2.0
68.9K

b Unknown error.

2 years ago
(updated 2 years ago)

On clicking the shortcut or using the hotkey, I get this fun error:


The mod Solar Calculator (0.3.11) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event solar-calc::kaktusbot-sc-switch-calc-gui-input (ID 240)
solar-calc/control.lua:32: attempt to index local 'main_gui' (a nil value)
stack traceback:
solar-calc/control.lua:32: in function 'switch_gui'
solar-calc/control.lua:178: in function
<solar-calc/control.lua:176>


I have a few mods that add to the GUI, so I will be going through them to see what causes this exact issue, updates will (hopefully) come shortly.

2 years ago

That means that on_player_created event wasn't fired or game.players[] didn't contain you while script.on_init was initially run.
I had similar bug for a really long time, I've seen people complain at it on Space Exploration Discord server, even here https://mods.factorio.com/mod/solar-calc/discussion/6251834a9fbedb9839f34008
But I have no idea how it can be happening.
I've started complete rewrite of the mod 6 months ago but dropped it soon, because I didn't like my new UI.
So I will not update my mod anymore until I get it together and finish a rewrite.

New response