ClaudeMetz/FactoryPlanner

Increasing amount of item in subfloor crashes game (custom event ID 250)

Opened this issue · 0 comments

Problem Description

Adjusted the value of an item in a subfloor from 10 to 11 to attempt to calculate for the 10 in one floor and the 1 needed for another. Game crashed with the following error thrown:

The mod Factory Planner (1.1.78) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factoryplanner::Custom event (ID 250)
factoryplanner/ui/main/production_handler.lua:220: attempt to perform arithmetic on field 'percentage' (a nil value)
stack traceback:
factoryplanner/ui/main/production_handler.lua:220: in function '?'
factoryplanner/ui/dialogs/generic_dialogs.lua:211: in function 'dialog_close'
factoryplanner/ui/base/modal_dialog.lua:187: in function 'exit'
factoryplanner/ui/event_handler.lua:216: in function <factoryplanner/ui/event_handler.lua:189>
[C]: in function 'raise_event'
factoryplanner/util/raise.lua:27: in function 'close_dialog'
factoryplanner/ui/event_handler.lua:54: in function 'special_handler'
factoryplanner/ui/event_handler.lua:133: in function <factoryplanner/ui/event_handler.lua:114>
stack traceback:
[C]: in function 'raise_event'
factorio-current.log

__factoryplanner__/util/raise.lua:27: in function 'close_dialog'
__factoryplanner__/ui/event_handler.lua:54: in function 'special_handler'
__factoryplanner__/ui/event_handler.lua:133: in function <__factoryplanner__/ui/event_handler.lua:114>

Reproduction

  1. Load a full pY game
  2. Go into the factory planner
  3. Create a new recipe
  4. Click on some products and create a subfloor or 4
  5. Click on a finished product that has a subfloor and is in a subfloor itself
  6. Change the expected value (in my case I increased from 10 to 11)
  7. Get game crash