Misleading error source reported for styles

Place to get help with not working mods / modding interface.
Post Reply
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Misleading error source reported for styles

Post by moon69 »

"StyleTestA" mod correctly implements a style, and allows the game to load...

Code: Select all

local style = data.raw["gui-style"].default
style.StyleTestA =
{
  type = "button_style",
  parent = "frame_action_button",
  width = 66
}
"StyleTestB" mod has a style error, and Factorio doesn't load ...

Code: Select all

local style = data.raw["gui-style"].default
style.StyleTestB =
{
  type = "button_style",
  parent = "close_button",
  width = 66
}
The load error though makes it look like StyleTestA is at least partially to blame.
StyleTestB.png
StyleTestB.png (1.13 MiB) Viewed 960 times

Prototype/GuiStyle says we have to use ["gui-style"].default.

Is there a better/recommended way of defining a style?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Misleading error source reported for styles

Post by darkfrei »

moon69 wrote:
Tue May 26, 2020 6:13 pm
Is there a better/recommended way of defining a style?
There is definition of the style frame_action_button
2020-05-26T23_39_19-Window.png
2020-05-26T23_39_19-Window.png (7.98 KiB) Viewed 943 times
but no style close_button

User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: Misleading error source reported for styles

Post by moon69 »

Thanks Darkfrei, but I am actually wondering how to avoid mod A being disabled when the error is actually in unrelated mod B?
StyleTestB2.png
StyleTestB2.png (60.29 KiB) Viewed 926 times

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Misleading error source reported for styles

Post by posila »

I improved mod tracking for "Parent style not found" error for next release (0.18.28)

User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: Misleading error source reported for styles

Post by moon69 »

Cool thanks.

Post Reply

Return to “Modding help”