This repository has been archived by the owner on Nov 10, 2018. It is now read-only.
Error in PurchasePromptScript #306
Labels
Comments
Tried looking through the CoreScript myself and there's all kinds of oddities. First is the code surrounding line 665: -- now we start talking money, making sure we are going to be able to purchase this
--wait, how did the code get past here if currentProductInfo is nil?
--Some other thread set currentProductInfo while getPlayerBalance() yielded?
if not setCurrencyAmountAndType(tonumber(currentProductInfo["PriceInRobux"]), tonumber(currentProductInfo["PriceInTickets"])) then
descText = "We could retrieve the price of the item correctly. Please try again later."
return true, nil, nil, true, descText
end
local playerBalance = getPlayerBalance()
if not playerBalance then
descText = "Could not retrieve your balance. Please try again later."
return true, nil, nil, true, descText
end
-- Line 665 below:
if tonumber(currentProductInfo["MinimumMembershipLevel"]) > membershipTypeToNumber(game.Players.LocalPlayer.MembershipType) then
notRightBc = true
end Going up the call stack: function checkIfCanPurchase()
if checkingPlayerFunds then
local canPurchase, insufficientFunds, notRightBC = canPurchaseItem() -- check again to see if we can buy item
--what are these boolean operations even doing? they sure don't *look* right to me
if not canPurchase or (insufficientFunds or notRightBC) then -- wait a bit and try a few more times
local retries = 1000
while retries > 0 and (insufficientFunds or notRightBC) and checkingPlayerFunds and canPurchase do
wait(1/10)
-- a thousand retries ten times a second?! O_e
canPurchase, insufficientFunds, notRightBC = canPurchaseItem()
retries = retries - 1
end
end
if canPurchase and not insufficientFunds then
-- we can buy item! set our buttons up and we will exit this loop
setButtonsVisible(purchaseDialog.BodyFrame.BuyButton,purchaseDialog.BodyFrame.CancelButton, purchaseDialog.BodyFrame.AfterBalanceText)
end
end
end And the only reference to checkIfCanPurchase: Game:GetService("GuiService").BrowserWindowClosed:connect(checkIfCanPurchase) What is the "browser window" in this context? This doesn't seem to be connected to the usual PromptPurchase that place developers use... |
If you try to buy something in-game and don't have enough money, ROBLOX opens up the embedded browser to let you buy robux. |
In the future I think these bugs should be filed here: ROBLOX/Core-Scripts |
More info: The following error often occurs in conjunction with the initially reported error:
|
Issue submitted to ROBLOX/Core-Scripts. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am seeing this error in Google Analytics using the new GA module:
The text was updated successfully, but these errors were encountered: