Android Question anywheresoftware.b4a.BA.ObjectToLongNumber

D

Deleted member 103

Guest
Hi,

can someone tell me why this error is raised?

The numbers are stored in a Config.ini, and the error should be raised when reading back?

The line "_vvvvvvvvvvvvvvvvvvvvvvvvvvv5 " corresponds to the Sub "goReadStatistik"

So the variables are declared:
B4X:
    'Varablen für Statistik
    Dim intSpieleGesamt4K, intSpieleGesamt5K, intSpieleGesamt7K As Long
    Dim intEndSpiele4K, intEndSpiele5K,intPunkteStand5K, intEndSpiele7K As Long

Here is the crash report:

B4X:
Sub goWriteStatistik
    Dim mp As Map
    mp.Initialize
    mp.put("Version",Application.VersionName)
    mp.put("intSpieleGesamt4K",intSpieleGesamt4K)
    mp.put("intEndSpiele4K",intEndSpiele4K)
    mp.put("intSpieleGesamt7K",intSpieleGesamt7K)
    mp.put("intEndSpiele7K",intEndSpiele7K)
    mp.put("intSpieleGesamt5K",intSpieleGesamt5K)
    mp.put("intEndSpiele5K",intEndSpiele5K)
    mp.put("intPunkteStand5K",intPunkteStand5K)
    mp.put("user_id",user_id)
    mp.put("strUserName",strUserName)
    File.WriteMap(File.DirInternal, "config.ini", mp)
End Sub

B4X:
Sub goReadStatistik
    Dim version As String
    Dim mp As Map
    mp = File.ReadMap(File.DirInternal, "config.ini")
    version           = mp.get("Version")
    intSpieleGesamt4K = mp.get("intSpieleGesamt4K")
    intEndSpiele4K    = mp.get("intEndSpiele4K")
    intSpieleGesamt7K = mp.get("intSpieleGesamt7K")
    intEndSpiele7K    = mp.get("intEndSpiele7K")
    intSpieleGesamt5K = mp.get("intSpieleGesamt5K")
    intEndSpiele5K    = mp.get("intEndSpiele5K")
    intPunkteStand5K  = mp.get("intPunkteStand5K")
    user_id           = mp.get("user_id")
    strUserName       = mp.get("strUserName")
End Sub
 
D

Deleted member 103

Guest
If this is indeed the case then you should use mp.GetDefault instead of Get.
Funny, I have not added a new variable since several versions.
But I will now use the function "mp.GetDefault".
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…