Helmod: Assistant for planning your factory

by Helfima

Assistant for planning your factory. Can calculate required ingredients, products, machines, modules, and beacons. Can also calculate power production / consumption.

Utilities
4 days ago
0.14 - 1.1
367K

b Met unexpected error 383

4 years ago

Kitty was quantifiying my new production line, however, when Kitty clicked on the manage button of 'beacon' in the Production Block, it showed no beacon management interface, instead, an error occured:

helmod/controller/Controller.lua: 383: attempt to index field '?' (a nil value)

Basemod version: 0.17.43
Helmod version: 0.8.11

And when this error occured, all helmod interfaces' interaction were froze, clicked on any button would also return this 383 error, which meant the logic cycle must be broken..

Pls check and thx..

Meow..!

4 years ago

Oh, my..!

Kitty changed for helmod's older version, 0.8.9, and turn off all the other mods, and create a new game, however, the problem still existed, this time it showed the error as above, execpt the error number has been changed to 384.

Meow..!

4 years ago

Having exactly the same problem.

Going into Production Block -> clicking "Factory" and "Module" tabs is working great -> clicking "Factory" and "Beacon" tabs gives mentioned error.

I've dig around a little bit, but was unable to fix it. Most glaring issue is how ui element looks up during event update. {"menu":"HMMainMenuPanel","left":"HMLeftMenuPanel","data":"block_1"} , while this is ui during switching of properly working panels: ui"{"menu":"HMMainMenuPanel","left":"HMLeftMenuPanel","data":"HMProductionBlockTab","dialog":"HMRecipeEdition"}

Nil is this case is obviously trying to access 'views["block_1"]; which obviously doesn't exist nor should it. My candidates for fix were function onEventAccessAll() where we have this: if action == "change-tab" then ui.data = item ui.dialog = helmod_tab_dialog[item]
and parameters for this event are item='block_1', item2='R1', item3='beacon', which is wrong. However trying to send proper parameter to this didn't work. So I figured problem must lay on higher level.

On higher level in AbstractEdition.lua changing 'change-tab' to 'change-panel' in updateTabMenu() function was not enough. Well. it stopped crashing but it changes between tabs in wrong panel. Can't really locate how to point to proper tabs.

New response