I can't find the mistake.. please help. The program crashes on this simple example and I can't find what is wrong.
B4X:
Sub Process_Globals
Type anInt (x As Int)
End Sub
Sub Globals
Private Button1 As Button
Dim arrayofints() As anInt
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
arrayofints(0).x=150
ToastMessageShow(arrayofints(0).x, False)
End Sub