Hey there, I was moving stuff from a test place to an actual game then saw the code doesn’t work as expected in the game but it works perfectly in the test place.
i’ve created new developer products and game passes and replaced the id’s in the code
i’ve enabled api services and third party sales
it’s basically a shop where you can buy currency or coils, but in the game it doesn’t give you any of that if bought, could the red lines under the code? Any help is appreciated, thank you.
Could it be the weird indentation? I noticed in the original the line numbers are fine, but in the new one it sometimes skips them (and the errors only appear after them). See if you can fix the lines.
There is most likely a hidden whitespace in your script (U+2028). This specific character acts like a newline but isn’t interpreted as one in the editor/compiler. Your best bet is to copy the working one into the broken one.
In your test place, you didn’t have whitespace between the dictionary values
Hence the lines on the right are in order, 12,13,14,15 etc.
In your new place, there are whitespaces, unrecognized by the script editor.
Try removing the lines and adding them back in.
It could be that you’re indexing the cash passes by putting the ids in strings. Try making them plain numbers. If that doesn’t work, could you show me the Developer Product handler you have?
You somehow managed to place a line separator character somewhere. Was this code written in some kind of an online IDE and then copied over to Roblox maybe? Not all white space unicode characters are treated the same in Lua.
Search U+2028 in google, copy the character from some unicode lookup site and paste it in Find. Then replace it with spaces, tabs or new lines.
Alright, make sure the Developer Products are owned by the group (because they might be owned by you and 3rd party purchases would probably be disabled).
Yeah, that’s not the issue then. I’d be nice if purchase errors gave more information. Are you returning Enum.ProductPurchaseDecision.PurchaseGranted in your ProcessReciept function?