Index is just an int
I can even replace the code with
B4X:
dim temp = Event.Index
Select Case Event.Index
Same problem
The next line in this case is just
B4X:
Case 0'selection
EDIT: It was cause one of the case lines were wrong.
I did case functionname and forgot the parameters
It'd be nice if it mentioned the actual error instead of the select case line