[Rseding91] LuaGuiElement (switch): allow_none_state is ignored and crash

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

[Rseding91] LuaGuiElement (switch): allow_none_state is ignored and crash

Post by raiguard »

Hello, I have two bugs for you. Here is a console command that will reproduce the bugs:

Code: Select all

/c game.player.gui.screen.add{type='frame', name='test_frame', caption='Test frame'}.add{type='switch', name='test_switch', allow_none_state=true, switch_state='none', left_label_caption='On', right_label_caption='Off'}
1: allow_none_state is ignored
If you run the above command, the game will return an error, saying that allow_none_state must be true if switch_state is set to none. However, you can clearly see in the command that allow_none_state is true, and the game is incorrectly throwing the error.

2: Crash
If you take the above command and change switch_state to left or right, the game will crash entirely. I have attached my log file below.
Attachments
factorio-current.log
(10.97 KiB) Downloaded 121 times
Don't forget, you're here forever.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaGuiElement (switch): allow_none_state is ignored and crash

Post by Bilka »

Issue 1 is fixed for the next version.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement (switch): allow_none_state is ignored and crash

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”