once again, this is SimpleAdmin NOT me.
Then remove that loop.
You’re welcome.
so u want me to do this
--for i = 1, 3 do
local Success, Return = pcall(function()
for k,v in pairs(Data.DefaultGlobalData) do
print("getting global data")
local GlobalData = Data.GlobalDataStore:GetAsync(k)
if not GlobalData then
print("setting global data")
Data.GlobalDataStore:SetAsync(k, v)
end
end
end)
if not Success then
warn("SimpleAdmin | Data Init Error | " .. Return)
end
--end
Yes, that is exactly what I want you to do.
This will solve your issue (to be honest, switch over to ProfileService if you have no clue on what you’re doing, don’t take it personal.)
It has a lot of guides and is very optimized.
no i very much do have a clue, this system is just uhh different. i think there is a reason its looped 3 times, but i guess only one way to find out
I assumed you didn’t have a clue based on what you asked me regarding on how to remove the loop.
Keep it if you’d like to, I’m only helping you here.
The only reason I see in this is wasting bandwidth and reaching the rate limit’s.
This is as useless as setting the same variable 3 times with the same value. The only difference is that the impact is way bigger
no i was confirming what you mean simply because there are multiple loops you could’ve been referring to, so based on your answer i inferred you meant all of them
They mean all of the loops. All the for i 1, 3 loops that use datastore. All of them
I’ll specify: Remove all the loops starting with for i = 1
.
This script is very bad for your game. I would not recommend you keep it.
I understood… as i already stated. I removed them
im not an idiot ;-;
I just don’t understand why you’d need to ask me if you “know what you’re doing”, that is all.
Since your issue seem to be solved, I won’t respond to this thread unless you have further issues.
The last time i tried to use profileservice, none of my data saved i tried everything and asked help but got nothing.
Then you set it up incorrectly.
There are a lot of guides out there.
Some examples are YouTube, Github, and the official documentation site for it, which is here: ProfileService
Hi, I am still getting the warning " DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 464517206"
and the error (check image):
What is your current code?
Would be helpful to know
If anything ProfileService is just datastores but more exposed. Having setter and getter functions is not always what you want.
I fixed it. Did this since I realizing that data was being sent two times for one player. hopefully this resolved it
use update async instead of setasync