generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Can somebody fix this for me?

Previous Thread :: Next Thread 
gileshaspiles is not online. gileshaspiles
Joined: 25 May 2014
Total Posts: 48
13 Jun 2014 07:56 AM
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")

CASHID = 20116834

MarketplaceService.ProcessReceipt = function(receiptInfo)
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
local numberBought = ds:IncrementAsync(playerProductKey, 1)
for i,v in pairs (game.Players:GetChildren()) do
if v.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == CASHID then
local PointsService = Game:GetService("PointsService")
PointsService:AwardPoints(Player.PlayerId, 100)


end
end
end


return Enum.ProductPurchaseDecision.PurchaseGranted
end
Report Abuse
batistapowerbonbtla is not online. batistapowerbonbtla
Joined: 16 Dec 2011
Total Posts: 2203
13 Jun 2014 09:43 AM
I told you what to do

print("check 1: "..v.userId..","..receiptInfo.PlayerId)
if v.userId == receiptInfo.PlayerId then
print("check 2: "..CASHID..","..receiptInfo.ProductId)
if receiptInfo.ProductId == CASHID then
print("successful")
v.Tickets.Value = v.Tickets.Value+15
Report Abuse
gileshaspiles is not online. gileshaspiles
Joined: 25 May 2014
Total Posts: 48
13 Jun 2014 09:55 AM
when did you tell me?
Report Abuse
batistapowerbonbtla is not online. batistapowerbonbtla
Joined: 16 Dec 2011
Total Posts: 2203
13 Jun 2014 10:03 AM
Nvm lol

But change these lines:
if v.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == CASHID then
To:
print("check 1: "..v.userId..","..receiptInfo.PlayerId)
if v.userId == receiptInfo.PlayerId then
print("check 2: "..CASHID..","..receiptInfo.ProductId)
if receiptInfo.ProductId == CASHID then

Then go in your game, press F9 and post the output from the server console
Report Abuse
gileshaspiles is not online. gileshaspiles
Joined: 25 May 2014
Total Posts: 48
13 Jun 2014 10:15 AM
thxs
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image