[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
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

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

Post by Raiguard » Mon Aug 12, 2019 7:28 pm

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 15 times
Don't forget, you're here forever.

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

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

Post by Bilka » Mon Aug 12, 2019 7:32 pm

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: 9969
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 » Mon Aug 12, 2019 11:56 pm

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”

Who is online

Users browsing this forum: No registered users