'That' segment must be in the Heap or Screen range in StarTrekGame.new.146
The supplied compiler uses the 'that' segment for array indexing. This message means that the memory address resulting from base[index] is not valid. The most likely cause is that base has not been set so its value is 0.
The easiest way to debug Jack programs in the VM Emulator is by putting Output.printXxx() statements in your code to show its progress. Look at the generated VM code and make a guess at what source line generated the VM code that failed and start putting prints there.