Code: Select all
-- creates the button, does not set it straight-rail
/c but = game.player.gui.center.add{type="choose-elem-button", name="elembut", elem_type="entity", elem_value = "straight-rail"}
-- errors that it is not an item prototype
/c but.elem_value = "straight-rail"
-- doesn't change the button value to stone furnace
/c but.elem_value = "stone-furnace"