Android Question array inside a type declaration

hub73

Active Member
Licensed User
Longtime User
Hello!
Is it correct to declare an array inside an type like this :

Type Type_playlist (Id As Int, Pk_num_playlist As Int, Music_file(100) As String, Music_title(100) As String)

B4X:
    Dim Playlist(6) As Type_playlist
   
    For j=0 To 4
        Playlist(0).Music_file(j) = "test.mp3"  ' <--------- java.lang.NullPointerException here !
    Next

error occcured java.lang.NullPointerException !

Many thanks !
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…