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

Dev product script not printing anything?

Asked by
pwnd64 106
8 years ago

Hey, trying to make a dev product for my game but it just doesn't work. No errors, no prints, nothing.

Here's the code -

ShekelsGiven = script.Parent.AmountGiven

ProductID = 31831485

game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo)

    for i, player in ipairs(game.Players:GetChildren()) do
        print'1'        
        if player.userId == receiptInfo.PlayerId then
        print'2'
            if receiptInfo.ProductId == ProductID then
                print'3'
                if receiptInfo.CurrencyType == Enum.CurrencyType.Robux then
                    print'4'
                    player.ShopValues.Shekels.Value = player.ShopValues.Shekels.Value + ShekelsGiven.Value
                print'5'

                end

            end

        end

    end
print'6'    
                return Enum.ProductPurchaseDecision.PurchaseGranted

end

Thanks for reading

0
Are you prompting a purchase? TheDeadlyPanther 2460 — 8y
0
I don't know much on this topic. Can you elaborate? pwnd64 106 — 8y

1 answer

Log in to vote
-1
Answered by 8 years ago

You do print (4) instead of print'4' . print is always in parentheses.

0
Print'' can only print strings, not numbers or values. Otherwise, print'' works, as with all functions. TheDeadlyPanther 2460 — 8y
Ad

Answer this question