#Datastore Hell
24 messages · Page 1 of 1 (latest)
Global/(UserId)
|
Version number can be 1-(number of times my data was saved)
|
Data
|
Wipe = false
** You are now Level 1! **
yes
thats fairly easy to do
have a variable that is set to nil, loop through all the keys, if the key is higher then the variable then the variable is set to the key
also imo data stores are extremely simple
when looping though all the keys what method should i use?
for i, v
do something like
local highestKey =
for i, v in pairs(keytable)
if highestKey then
if v > then highestKey then
highestKey = v
end
else
highestKey = v
end
then u get the highest key
how are your keys stored
ill send a ss
okay
im away from my laptop but its a datastore with a buncha keys with number names that represent the version of the players data the lower the older
those keys have data stored in them
huh
to get the highest valued you should use ordereddatastore
if i used that method would i still have to use a loop?