Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does this PromptProductPurchase error mean?

Asked by 7 years ago

PurchasePromptScript: getProductInfo failed because MarketplaceService:getProductInfo() failed because rawProductInfo was empty Make sure a valid ID was specified <

LocalScript:

01local MPS = game:GetService("MarketplaceService")
02local RPS = game:GetService("ReplicatedStorage")
03 
04script.Parent.MouseButton1Click:connect(function()
05    MPS:PromptProductPurchase(game.Players.LocalPlayer, 643910613)
06end)
07 
08RPS.Events.BuyPrompt.OnClientEvent:connect(function(player, product)
09    if product == "Upgrade" then
10        script.Parent.Text = "You Own This Item"
11    end
12end)

Main Script:

01local MPS = game:GetService("MarketplaceService")
02local RPS = game:GetService("ReplicatedStorage")
03local product = ""
04 
05MPS.ProcessReceipt = function(purchaseInfo)
06    local player = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
07    if purchaseInfo.ProductId == 643910613 then
08        product = "Upgrade"
09        RPS.Events.BuyPrompt:FireClient(product)
10    elseif purchaseInfo.ProductId == 653173240 then
11        product = "Elite"
12        RPS.Events.BuyPrompt:FireClient(product)
13    elseif purchaseInfo.ProductId == 659939994 then
14        product = "Palace"
15        RPS.Events.BuyPrompt:FireClient(product)
16    end
17    return Enum.ProductPurchaseDecision.PurchaseGranted
18end
0
Well, was a valid ID specified? Asceylos 562 — 7y
0
What does that mean? SynthetickDev 188 — 7y
0
The ids in the script are valid yes, if that is what you mean SynthetickDev 188 — 7y
0
Double check that those are valid IDs. They could have typos. PyccknnXakep 1225 — 7y
View all comments (2 more)
0
100% valid checked them 10 times SynthetickDev 188 — 7y
0
Double the times you've checked them. thesit123 509 — 7y

1 answer

Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
7 years ago

The error means that it cannot do PromptProductPurchase because the ID is wrong or it cannot find the ID. Double check the IDs in your scripts.

Ad

Answer this question