iOS Question Compile Error using Map

ilan

Expert
Licensed User
Longtime User
hi

i have a map and i put inside mediaplayer objects to play sound.
if i want to get back the mediaplayer with an id i get an error when i compile:

B4i Version: 6.80
Parsing code. (0.07s)
Building folders structure. (0.09s)
Compiling code. (0.19s)
Compiling layouts code. (0.00s)
Compiling debugger engine code. (0.01s)
Building Xcode project (0.12s)
Sending data to remote compiler. Error
B4i line: 25
Dim mp As MediaPlayer = mpMap.Get(id)
expected expression

this is the code:

B4X:
If mpMap.ContainsKey(id) Then
        Dim mp As MediaPlayer = mpMap.Get(id)
        If mp.IsInitialized Then
            mp.Pause
            mpMap.Remove(id)
        End If
    End If

i managed to compile it in debug mode by comment those lines then uncomment them and click save and it works just fine but i am not able to compile without this trick, why?

thanx
 

ilan

Expert
Licensed User
Longtime User
I'm unable to reproduce it. Can you upload a small project with this code?

thank you erel for your reply. i have sent you the whole project via mail.
(i just cannot include some files here in this forum because of license related issue)

thanx a lot, ilan
 
Upvote 0
Top