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

Why doesn't ProcessReceipt Fire?

Asked by
ZeroBits 142
10 years ago

I've tried everything I could think of, but the function won't fire when I buy the dev product. sometimes after I rejoin the place, it recognises that I bought the item, but I'd like it to recognise instantly.

the place with the script in question is here

and here is the script in question, all variable references are to existing items

001if game.ServerScriptService:FindFirstChild("VaporPurchaseHandler") ~= nil then
002    script.Parent = game.ServerScriptService
003else
004    script:Destroy()
005end
006 
007-- debugging code added by ihaveamac
008enable_debug_print = true
009function print_d(m)
010    if enable_debug_print then
011        print("<debug> "..m)
012    end
013end
014 
015print_d("DEBUG MODE ACTIVE")
View all 102 lines...
1
Just a tip for testing this: make this a named function, and have ProcessReceipt call that function, passing in the receipt itself as an argument. This lets you create a "spoof" receipt that bypasses actually purchasing anything to check your code. adark 5487 — 10y
1
Just skimming this I don't see anything wrong. You used ProcessReceipt as a callback and not an event, which is correct. My only guess is that the datastore stuff is causing it the break without properly erroring. adark 5487 — 10y
0
That was my first guess, but if it were the data stores, the function should have at least run up to the point where datastores were used, currently it doesn't run at all between lines 23, and 100 ZeroBits 142 — 10y
1
I've had this problem too. Especially when I have multiple products. I'm not sure why it doesn't work right :/ lightpower26 399 — 10y
View all comments (4 more)
0
Is this in a Server Script? Goulstem 8144 — 9y
0
yes. ZeroBits 142 — 9y
0
Could this be roblox sided, not you? Teeter11 281 — 9y
0
yes. ZeroBits 142 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

I would try using PromptPurchaseFinished it is a secondary way to solve the problem. http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchaseFinished

0
While the project has long since been scrapped, I appreciate the help, and thank you for pointing me to this wonderful event, I'll probably use it a lot. ZeroBits 142 — 9y
Ad

Answer this question