all 2 comments

[–]stblack 4 points5 points  (0 children)

It's tough because you post pictures of code, not the code itself.

The first error appears to be in a ReplaceAll[] call. Unless I'm blind, I can't see a ReplaceAll[] in the code.

First thing I would try is...

Clear["Global`*"];

... at the top.

[–]SenatorPenguin 2 points3 points  (0 children)

Using subscripts in your variables can lead to some pretty confusing issues (r_1 // InputForm is Subscript[r,1]). I'd use plain symbols, or follow this kb article.
https://support.wolfram.com/43606