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:

local MPS = game:GetService("MarketplaceService")
local RPS = game:GetService("ReplicatedStorage")

script.Parent.MouseButton1Click:connect(function()
    MPS:PromptProductPurchase(game.Players.LocalPlayer, 643910613)
end)

RPS.Events.BuyPrompt.OnClientEvent:connect(function(player, product)
    if product == "Upgrade" then
        script.Parent.Text = "You Own This Item"
    end
end)

Main Script:

local MPS = game:GetService("MarketplaceService")
local RPS = game:GetService("ReplicatedStorage")
local product = ""

MPS.ProcessReceipt = function(purchaseInfo)
    local player = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
    if purchaseInfo.ProductId == 643910613 then
        product = "Upgrade"
        RPS.Events.BuyPrompt:FireClient(product)
    elseif purchaseInfo.ProductId == 653173240 then
        product = "Elite"
        RPS.Events.BuyPrompt:FireClient(product)
    elseif purchaseInfo.ProductId == 659939994 then
        product = "Palace"
        RPS.Events.BuyPrompt:FireClient(product)
    end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end
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