I'm trying to create a Custom Type and use it in a sub declare as one of the parameters.
Here is what I have, but the one line (indicated with an arrow) show "types do not match - error #22":
Any ideas what I am doing wrong?
Here is what I have, but the one line (indicated with an arrow) show "types do not match - error #22":
B4X:
Sub Process_Globals
Type EventType(eventEvent As Int, eventError As Int)
Public EventTypes As EventType
EventTypes.eventEvent = 0: EventTypes.eventError = 1
End Sub
Sub SaveEvent(EType As EventType, EventText As String)
--> If EType = EventTypes.eventError Then 'Types do not match (Warning #22)
EventLine = " * "
Else
EventLine = " "
End If
End if
End Sub
Any ideas what I am doing wrong?
Last edited: