From 7634dc87da40d51220632c2316561d8e4b97573c Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:46:39 -0300 Subject: [PATCH 1/7] Update DeveloperProductExample.server.lua --- Examples/DeveloperProductExample.server.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/DeveloperProductExample.server.lua b/Examples/DeveloperProductExample.server.lua index 60b7312..de61800 100644 --- a/Examples/DeveloperProductExample.server.lua +++ b/Examples/DeveloperProductExample.server.lua @@ -86,7 +86,7 @@ function PurchaseIdCheckAsync(profile, purchase_id, grant_product_callback) --> table.remove(local_purchase_ids, 1) end table.insert(local_purchase_ids, purchase_id) - coroutine.wrap(grant_product_callback)() + task.spawn(grant_product_callback) end -- Waiting until the purchase is confirmed to be saved: @@ -173,7 +173,7 @@ end ----- Initialize ----- for _, player in ipairs(Players:GetPlayers()) do - coroutine.wrap(PlayerAdded)(player) + task.spawn(PlayerAdded)(player) end MarketplaceService.ProcessReceipt = ProcessReceipt @@ -187,4 +187,4 @@ Players.PlayerRemoving:Connect(function(player) if profile ~= nil then profile:Release() end -end) \ No newline at end of file +end) From 38e4659273b38f2ad1dfde19115b0528d2e03f6f Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:47:03 -0300 Subject: [PATCH 2/7] Update DeveloperProductExample.server.lua --- Examples/DeveloperProductExample.server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/DeveloperProductExample.server.lua b/Examples/DeveloperProductExample.server.lua index de61800..cb6311e 100644 --- a/Examples/DeveloperProductExample.server.lua +++ b/Examples/DeveloperProductExample.server.lua @@ -173,7 +173,7 @@ end ----- Initialize ----- for _, player in ipairs(Players:GetPlayers()) do - task.spawn(PlayerAdded)(player) + task.spawn(PlayerAdded, player) end MarketplaceService.ProcessReceipt = ProcessReceipt From ca287234741339ebd91c38d24bd72063252cfcc4 Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:48:03 -0300 Subject: [PATCH 3/7] Update PlayerProfileExample.server.lua --- Examples/PlayerProfileExample.server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/PlayerProfileExample.server.lua b/Examples/PlayerProfileExample.server.lua index 898fda3..2909bea 100644 --- a/Examples/PlayerProfileExample.server.lua +++ b/Examples/PlayerProfileExample.server.lua @@ -63,7 +63,7 @@ local function PlayerAdded(player) else -- The profile couldn't be loaded possibly due to other -- Roblox servers trying to load this profile at the same time: - player:Kick() + player:Kick() end end @@ -71,7 +71,7 @@ end -- In case Players have joined the server earlier than this script ran: for _, player in ipairs(Players:GetPlayers()) do - coroutine.wrap(PlayerAdded)(player) + task.spawn(PlayerAdded, player) end ----- Connections ----- From 2d76ea74c96a7f4a93a345e9fac52123a6eedcee Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:49:24 -0300 Subject: [PATCH 4/7] Update developer_products.md --- docs/tutorial/developer_products.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/developer_products.md b/docs/tutorial/developer_products.md index 63699e8..142aee9 100644 --- a/docs/tutorial/developer_products.md +++ b/docs/tutorial/developer_products.md @@ -86,7 +86,7 @@ function PurchaseIdCheckAsync(profile, purchase_id, grant_product_callback) --> table.remove(local_purchase_ids, 1) end table.insert(local_purchase_ids, purchase_id) - coroutine.wrap(grant_product_callback)() + task.spawn(grant_product_callback) end -- Waiting until the purchase is confirmed to be saved: @@ -172,7 +172,7 @@ end ----- Initialize ----- for _, player in ipairs(Players:GetPlayers()) do - coroutine.wrap(PlayerAdded)(player) + task.spawn(PlayerAdded, player) end MarketplaceService.ProcessReceipt = ProcessReceipt @@ -187,4 +187,4 @@ Players.PlayerRemoving:Connect(function(player) profile:Release() end end) -``` \ No newline at end of file +``` From d8c4c4f14890e9603cea0f2798634ffa3b0ea950 Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:50:28 -0300 Subject: [PATCH 5/7] Update basic_usage.md --- docs/tutorial/basic_usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/basic_usage.md b/docs/tutorial/basic_usage.md index 3ba718b..9b19dcf 100644 --- a/docs/tutorial/basic_usage.md +++ b/docs/tutorial/basic_usage.md @@ -81,7 +81,7 @@ end -- In case Players have joined the server earlier than this script ran: for _, player in ipairs(Players:GetPlayers()) do - coroutine.wrap(PlayerAdded)(player) + task.spawn(PlayerAdded, player) end ----- Connections ----- @@ -94,4 +94,4 @@ Players.PlayerRemoving:Connect(function(player) profile:Release() end end) -``` \ No newline at end of file +``` From f32f8f00f7cd6495b9150b92c0d6af3bcf1be2a0 Mon Sep 17 00:00:00 2001 From: LucasMZ <55422065+LucasMZReal@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:51:50 -0300 Subject: [PATCH 6/7] Update ProfileTest.server.lua --- ProfileTest.server.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ProfileTest.server.lua b/ProfileTest.server.lua index 467e8c2..3b67c66 100644 --- a/ProfileTest.server.lua +++ b/ProfileTest.server.lua @@ -36,10 +36,10 @@ local ServerScriptService = game:GetService("ServerScriptService") local ProfileService do local did_yield = true - coroutine.wrap(function() + task.spawn(function() ProfileService = require(ServerScriptService.ProfileService) did_yield = false - end)() + end) if did_yield == true then error("[ProfileTest]: ProfileService ModuleScript should not yield when required!") end @@ -182,7 +182,7 @@ if ProfileTest.TEST_MOCK == true then print("[MOCK]") end -coroutine.wrap(function() +task.spawn(function() print("RUNNING PROFILE TEST") @@ -665,4 +665,4 @@ coroutine.wrap(function() profile11:Reconcile() TestPass("ProfileService test #11", profile11.Data.Counter == 0 and profile11.Data.Array == false and type(profile11.Data.Dictionary) == "table") -end)() \ No newline at end of file +end) From 84b1d2dc77188c25403b1781a4ce29a169ebfbba Mon Sep 17 00:00:00 2001 From: Baileyeatspizza Date: Wed, 13 Oct 2021 17:14:58 +0100 Subject: [PATCH 7/7] Update ProfileService.lua --- ProfileService.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ProfileService.lua b/ProfileService.lua index 02f0378..47bcb4c 100644 --- a/ProfileService.lua +++ b/ProfileService.lua @@ -2253,21 +2253,18 @@ function ProfileService.GetProfileStore(profile_store_index, profile_template) - } setmetatable(profile_store, ProfileStore) - local options = Instance.new("DataStoreOptions") - options:SetExperimentalFeatures({v2 = true}) - if IsLiveCheckActive == true then profile_store._is_pending = true task.spawn(function() WaitForLiveAccessCheck() if UseMockDataStore == false then - profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope, options) + profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope) end profile_store._is_pending = false end) else if UseMockDataStore == false then - profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope, options) + profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope) end end