Can you update to the latest daily build and try to reproduce the console errors you got before? What line numbers from init.lua to you get reported back to you on the latest daily build?
I’ll do that when I get home, right now I’m out. It is really strange, I thought I was doing everything right Lol.
The thing is, I updated to the latest daily buildyesterday for this reason, hopefully things will be different in the next build…I’ll update shortly…
ah. interesting. looks like my error is coming from init.lua:222 now. any ideas?
It’s trying to dispatch a function listener in EventListener:dispatchEvent. Nevermind though, I failed at reading your console log. The error is in the dispatched function, not in the dispatcher.
The issue looks to be in the purchase function and the use of table.count, which isn’t a thing in our version of Lua.
so this is a bug in iap_badger? not my code?
That was my guess from the log. Do you use someObject.count anywhere in your code?
I suppose you could test it by defining a custom table.count somewhere early on in main.
I supply a table.count() function as part of SSK. Here is the code:
-- == -- table.count( src ) - Counts all (first-level) entries in table -- == function table.count( src ) local count = 0 if( not src ) then return count end for k,v in pairs(src) do count = count + 1 end return count end
You can add this and see if that helps.
Ah - table.count is indeed a helper function I’ve added in another file (crashes and burns…)
I’ve just updated the github repository to include the above change (and one minor other bugfix) - let me know if the changes work for you.
You can find the file here.
wow i was just about to reply lmao. awesome give me a few minutes…
MY GOD IT FREAKING WORKED!!! UGHH such a big setback lmao. THANK YOU EVERYONE FOR THE HELP! and thank you roaming gamer for the solution.
You’re welcome, but I want to turn that back @happymongoose for such an awesome module. It makes my life easier and that rocks.
I’m glad it works for you
I am using Iap badger for my in app purchases and it works for making the purchases. But I just noticed one issue. I have some moving parts in my game and the transitions are halted when badger is used and then then are not restarted at the end of the purchase. I haven’t been able to locate the code in badger that would cause the transitions to stop.
I have 150 levels and many would have transitions that need to restart after an IAP.
I would appreciate any help on how to restart these transitions.
Thanks
Lori
Hi Lori,
I think your problem may lie somewhere else.
You’re right when you say that IAP Badger doesn’t use the transition library at all - the only (vaguely) related calls it makes are to timer.performWithDelay, which wouldn’t cancel any transitions you’ve set up. If it helps, I don’t think that the standard Corona store libraries affect transitions either (although you may see some juddering when a live device contacts the App Store).
I think something else must be going on with your code - maybe you’re moving between scenes in composer, and one of your listeners is causing the transitions to pause?
Simon
to turn off the debug mode, I just need to comment this:
debugMode=true,
?
Or make it ‘false’?
Hi there,
You can just comment it out.
Simon
0o0…
Just try it and it works!!!
Love it! Love it! Love it! Love it! Love it! Love it! Love it! Love it!
Great! Thank you sir for making such a beautiful code! XD… hehe…
Thanks Azhar
simple question, how to (code) consume a product after purchase coins?