Home Kwiksher Forums Kwik4 Odd IAP error
Tagged: IAP error
-
otterslidestudio@aol.com
ParticipantMarch 29, 2020 at 11:14 pm #85990I made a simple 5 page project to test IAP functions and found an odd error. If the the page with the IAP purchase code is the last page of the project or if I just export that single page, I get the following error:
20:00:42.346 error loading module ‘components.store.model’ from file ‘C:\Projects\NewInAppTest\build4\components\store\model.lua’:
20:00:42.346 C:\Projects\NewInAppTest\build4\components\store\model.lua:12: unexpected symbol near ‘=’I do not get that error if the page with the code is not the last page, or if I export it and the page that follows it.
The components/store/model.lua of the error looks like this:
M.debug =
———————————-
— M.URL = nil means simple IAP store without network download like Kwik3 IAP
— downloadBtn, savingTxt won’T be used. You don’t need to create them.
—
M.episodes = {
IAPtest_Paid_P ={name = “IAPtest_Paid_P”, dir = “”, numOfPages = 0, info = “”},
}
—
M.catalogue = {
products = {
IAPtest_Paid_P = {
productNames = { apple=”com.IAP.test.paidpages”, google=””, amazon=””},
productType = “non-consumable”,
onPurchase = function() IAP.setInventoryValue(“IAPtest_Paid_PP”) end,
onRefund = function() IAP.removeFromInventory(“IAPtest_Paid_P”) end,
},
},
inventoryItems = {
unlock_IAPtest_Paid_P = { productType=”non-consumable” },
}While the component/store/model.lua of the build without errors looks like this:
M.debug = true
———————————-
— M.URL = nil means simple IAP store without network download like Kwik3 IAP
— downloadBtn, savingTxt won’T be used. You don’t need to create them.
—
—
M.catalogue = {
products = {
IAPtest_Paid_P = {
productNames = { apple=”com.IAP.test.paidpages”, google=””, amazon=””},
productType = “non-consumable”,
onPurchase = function() IAP.setInventoryValue(“IAPtest_Paid_PP”) end,
onRefund = function() IAP.removeFromInventory(“IAPtest_Paid_P”) end,
},
},
inventoryItems = {
unlock_IAPtest_Paid_P = { productType=”non-consumable” },
}
}-
This topic was modified 3 years, 8 months ago by
otterslidestudio@aol.com.
-
This topic was modified 3 years, 8 months ago by
otterslidestudio@aol.com.
Yamamoto
KeymasterMarch 30, 2020 at 2:02 am #85995I found the internal data model for IAP is not initialized with the case you reported. I correct it in 0330 build.
http://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
Thank you for using IAP!
otterslidestudio@aol.com
ParticipantMarch 30, 2020 at 9:14 pm #85997Thank you! I am glad the files I sent you helped you to resolve this.
-
This topic was modified 3 years, 8 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.