djmango / BlackMarket2

A mod for Factorio economics
https://mods.factorio.com/mod/BlackMarket2
GNU General Public License v3.0
17 stars 7 forks source link

Index error when using "Only enable items researched" #34

Open Eylrid opened 2 years ago

Eylrid commented 2 years ago

Factorio version: 1.1.48 BlackMarket2 version: 2.1.0

Steps to reproduce:

  1. Set "Only enable items researched" to true in mod settings
  2. Start new game
  3. Use editor to get a Trading tank (buy)
  4. Place tank

Results in the following error:

The mod Black Market 2 (2.1.0) caused a non-recoverable error. Please report this error to the mod author.

Error while running event BlackMarket2::on_built_entity (ID 6) BlackMarket2/control.lua:2071: attempt to index field 'crude-oil' (a nil value) stack traceback: BlackMarket2/control.lua:2071: in function <BlackMarket2/control.lua:2020>

The error doesn't happen with "Only enable items researched" disabled.

AshPrinny commented 2 years ago

I have the same issue only for me it throws back the Index field "coal" (a nil value) option

It's because raw resources don't have a RESEARCH attached to them that unlocks them so it never unlocks them to buy either causing a deadfall trap in the code of the program.

djmango commented 2 years ago

I'm unable to recreate the issue. Are you using additional mods? Are you using a different version of Factorio? What do you mean by use editor, the scenario editor or is this something else?

Eylrid commented 2 years ago

Are you using additional mods?

No, no additional mods.

Are you using a different version of Factorio?

The version I used is listed in my first comment.

I also tried it in the latest version of Factorio, 1.1.59 and it still happens.

What do you mean by use editor, the scenario editor or is this something else?

I'm talking about the in game editor that you get by typing /editor in the console. You can also get the same problem in the regular game without using the editor. The editor is just the quickest way to get to the problem.

Eylrid commented 2 years ago

If you want I can take a video showing what I do to get the problem.

djmango commented 2 years ago

If you want I can take a video showing what I do to get the problem.

Yeah that would be great thanks

Eylrid commented 2 years ago

https://youtu.be/qKIki9d0Dd8

djmango commented 1 year ago

Yeah that would be great thanks

From: Eylrid @.> Date: Monday, June 6, 2022 at 1:34 AM To: djmango/BlackMarket2 @.> Cc: Sulaiman Ghori @.>, Assign @.> Subject: Re: [djmango/BlackMarket2] Index error when using "Only enable items researched" (Issue #34)

If you want I can take a video showing what I do to get the problem.

— Reply to this email directly, view it on GitHubhttps://github.com/djmango/BlackMarket2/issues/34#issuecomment-1146907034, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGZNIXE3BC34623IQHIAAPDVNU2PLANCNFSM5IW4LFSA. You are receiving this because you were assigned.Message ID: @.***>