Why is it showing an runtime error?

Welcome Jack.

A guess (we cannot see your Block code) is you use a

segment Block that extracts part of the text starting at start position and continuing for length characters.

A value segment uses is not correct (the Text you evaluate probably has not been provided yet).

Provide a clear Block image (go to Blocks screen; right click Download Blocks as Image and drag the downloaded file into this field). If we can see all your code, someone to provide more specific advice.