My code works for iOS but I’m getting this error for google when I’m calling the function store.loadProducts. I am only calling it once. How can I fix this?
local function loadProductsCallback( event ) buytxt.text = "Load function called" print("showing valid products", #event.products) for i=1, #event.products do print(event.products[i].title) -- This is a string. print(event.products[i].description) -- This is a string. print(event.products[i].price) -- This is a number. print(event.products[i].localizedPrice) -- This is a string. print(event.products[i].productIdentifier) -- This is a string. end print("showing invalidProducts", #event.invalidProducts) for i=1, #event.invalidProducts do print(event.invalidProducts[i]) end end
if store.isActive then if store.canLoadProducts then store.loadProducts( listOfProducts, loadProductsCallback ) end end