Home Kwiksher Forums Kwik4 IAP debug error
Tagged: IAP
-
otterslidestudio@aol.com
ParticipantMarch 27, 2020 at 1:48 am #85975I am getting the following runtime error when I try to test the IAP I’ve set up in my app:
extlib\iap_badger.lua:668: attempt to index upvalue ‘inventory’ (a nil value)
I created a test project last summer with the same product and IAP information and it functions correctly when tested with a debug purchase. I can find no difference between that working test app I generated last summer and the app I’m currently testing, but the current one keeps returning this error.
-
This topic was modified 3 years, 6 months ago by
otterslidestudio@aol.com.
otterslidestudio@aol.com
ParticipantMarch 27, 2020 at 2:24 am #85977I have found a difference in the 2 projects. In the Monetization tab of the Project Properties, the product ID has 2 commas after the ID name in the current project, but the one made last summer has no commas after it. I do not know if that is relevant or not.
otterslidestudio@aol.com
ParticipantMarch 27, 2020 at 8:51 pm #85978Following up on this. I built 2 new 4 page apps to try to work out this problem. One uses just simple single color pages with a few navigation and an unlock button, the other is more complex using interactive code, artwork, and buttons. Each one has an unlock page and locked pages.
With the simple version, going from page one to the unlock page (page 2) works as expected. The sandbox debug works and I can test unlocking the pages that follow. With the version using actual resources from my project I get the “inventory nil” error above when I go from the first page to the unlock page. However, If I go from the first page to one of the locked pages (which then automatically sends me back to the unlock page), I do not get the error and can test unlocking successfully.
Yamamoto
KeymasterMarch 28, 2020 at 10:01 pm #85984> the product ID has 2 commas after the ID name in the current project, but the one made last summer has no commas after it.
I changed the interface for inputting Product ID.
So you are having an problem with the project of no commas? Have you recreate the table of IAP in Monetization Tab to have commas which separates each Product ID of apple, google and amazon?
>“inventory nil” error above when I go from the first page to the unlock page.
I will test the case in a day.
Yamamoto
KeymasterMarch 29, 2020 at 1:34 am #85986I could not reproduce the problem. I made 4 pages. First page has the button for IAP it unlocks page2. page3 has the two buttons, one for goto page2 and another for goto page4. The page2 is a locked page.
For a white testing, I edit main.lua to start the app from page3 as well and no issues found.
Can I have your project file? If you can zip and send it to support@kwiksher.com, I will look into. I am afraid that because of the change of Product ID handling, I might inject a bug. In your .kwk file, the product IDs are set correctly like this?
<inApp> <mode>simple</mode> <prod id="test"> <appleID>a01</appleID> <googleID>b01</googleID> <amazonID></amazonID> <name>test</name> </prod> </inApp>
otterslidestudio@aol.com
ParticipantMarch 29, 2020 at 6:48 pm #85987I have sent you a small 3 page project that uses resources from my project. It includes two build folders: one that has a build with an IAP that works and one that has a build that errors. The only difference between the 2 builds is that the one that errors automatically goes from the startup page to the unlock page (page 2), while the good build automatically goes from the startup page to the locked page (page 3) first, then re-directs back to the unlock page (page 2).
The only code difference is the “go to page” command on page 1 references. Everything else is the same.
-
This reply was modified 3 years, 5 months ago by
otterslidestudio@aol.com.
Yamamoto
KeymasterMarch 30, 2020 at 1:56 am #85994http://kwiksher.com/daily/Kwik4_win_2020_0330.zip
http://kwiksher.com/daily/Kwik4_mac_2020_0330.dmgFIX: InApp Purchase components/store/model.lua was not initiated correctly
It contains the updated layer_button.lua that I sent you by email. Tmplt is updated to 2020.0001
Thank you for the project file. It helped me to debug the issue.
-
This topic was modified 3 years, 6 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.