SpinBower Member Licensed User Longtime User May 18, 2014 #1 Hi, so my app get the list of purchased items and returns them in a map. I want to check if the map is empty to I make an empty map and use an if statement to see if the purchases map is empty. But even though both of the maps match according to the log, it still says they don't. Thanks! Log: Code: Copy (MyMap) {} (MyMap) {} Code: Code: Copy Sub iab_OwnedProducts (Success As Boolean, Purchases As Map) Dim None As Map None.Initialize Log(None) Log(Purchases) If Purchases = None Then ToastMessageShow("No Purchases!", True) End If End Sub
Hi, so my app get the list of purchased items and returns them in a map. I want to check if the map is empty to I make an empty map and use an if statement to see if the purchases map is empty. But even though both of the maps match according to the log, it still says they don't. Thanks! Log: Code: Copy (MyMap) {} (MyMap) {} Code: Code: Copy Sub iab_OwnedProducts (Success As Boolean, Purchases As Map) Dim None As Map None.Initialize Log(None) Log(Purchases) If Purchases = None Then ToastMessageShow("No Purchases!", True) End If End Sub
NJDude Expert Licensed User Longtime User May 18, 2014 #2 Check the size of the map, if <> 0 then is not empty. Code: Copy If Purchases.Size > 0 Then ... Upvote 0
SpinBower Member Licensed User Longtime User May 18, 2014 #3 NJDude said: Check the size of the map, if <> 0 then is not empty. Code: Copy If Purchases.Size > 0 Then ... Click to expand... Thanks! Upvote 0
NJDude said: Check the size of the map, if <> 0 then is not empty. Code: Copy If Purchases.Size > 0 Then ... Click to expand... Thanks!