I have a problem with displaying the right price for in-app purchases. Everything works. And the first time if i go to the shop it displays the price. But when i go out of the shop and go back to it, the price changes to null and it stays like that. How can i change this?
Yes i have the same problem there. I included a scene change in the example project. So how could i work around that? Because my game has a lot of scene changes.
I tried variables on multiple places to store the prices. But it just doesn’t work. I have now found an sort of work around. Where i have the above events in the shop. And a extra page to restore the purchases. But after i restored it, and go back to the shop it’s again a null…
Is this a bug? To recreate: if you go to another scene and back to the shop with the example in app purcasche project. All the numbers change from the $$$-price to null.
That scene restarts every game round so I set it to load store data once only (with global Booleans).
I use code from here to check if the string is null.
As for my checking for approved state, read this.
UPD: don’t miss this!
It doesn’t work. When i first visit the shop page it shows correctly. When i visit the shop again, it wont change to null now. But just had the standard value. ($1,99 which is the value i filled in gdevelop and doesnt come from the store information.)
Did i do something wrong?
Why is it in your events that this is a scene variable and not an global variable?
You asked a good question. I don’t know why it is, but it works (I’ll change that and update the post with results) UPD: I have removed those string is null conditions and everything works fine!
As for your issue. Every time scene is restarted, all objects including price texts are being reset. So you must change them each time a scene is restarted by changing texts to global variables values (with previously saved price and currency).
I have this logic in At the beginning of the scene block: