How to reference element of array when compiler says that I'm trying to call a function with 'decides' effect

Hi.
Any time you call an array, it is a failable expression. This is because when you call it, there might be nothing there and it will return as false or fail. All you have to do is call the array from within an IF or FOR expression. In other words, call it conditionally. MyLines needs to be called like this:
if (MyLine[LineNumber]):

And then you can assign any value it returns IF it succeeds.

Perhaps this tutorial will help too: