[.15.9] luaItemStack.active_index using 0 based index
Posted: Mon May 08, 2017 6:33 pm
Holding a BP book with a few BPs in it with the first bp as the active bp and running this command results in inventory out of bounds error, adding 1 to the active index returns the correct index
/c game.print(game.player.cursor_stack.get_inventory(defines.inventory.item_main)[game.player.cursor_stack.active_index].name)
/c game.print(game.player.cursor_stack.get_inventory(defines.inventory.item_main)[game.player.cursor_stack.active_index].name)