Added constant for total page count

This commit is contained in:
Cooldude2606
2026-09-06 01:07:19 +01:00
parent f961a8d82e
commit 01bc4cd14d
+2 -1
View File
@@ -21,6 +21,7 @@ PlayerFilters:set_metadata{
} }
--- Filters are stored by a single index across the ten pages of ten slots --- Filters are stored by a single index across the ten pages of ten slots
local total_page_count = 10
local slots_per_page = 10 local slots_per_page = 10
--- Loads your quickbar preset --- Loads your quickbar preset
@@ -43,7 +44,7 @@ Commands.new("save-quickbar", "Saves your Quickbar preset items to file")
:register(function(player) :register(function(player)
local filters = {} local filters = {}
for page = 1, slots_per_page do for page = 1, total_page_count do
for slot = 1, slots_per_page do for slot = 1, slots_per_page do
-- Records, remotes and specific item instances hold data which can not be saved by name -- Records, remotes and specific item instances hold data which can not be saved by name
local quick_bar_slot = player.get_quick_bar_slot(page, slot) local quick_bar_slot = player.get_quick_bar_slot(page, slot)