I'm can't seem to find the thing causing the index on my string to go out of range. I'm trying to read a string like "N2e1E01n0e2e1" and match the numbers to the directions. "E01" would be E or e with a maxSteps of 1. I can't seem to get it to read the last alphabet and number "e1". It reports back the direction and maxSteps fine up to "N2e1E01n0e2" and then I think the out of range error stops it from going on to the "e1".
On line 12, you've incremented the "index" so you're going to be trying to call path[index] when index is out of range. I'd suggest you use a for loop and control the increment of index from there, rather than a while loop (your donig a similar thing again on line 18)