Here is the code, and i tried commenting it so it is easy to follow, in a nutshell all this is doing is creating a circle, hatching it with the color red, and making a line from the center upwards and making it red..
Now it runs all of this perfectly smoothly.. but when i copy and paste the exact code block that generates the line going up and just change some variables so that the line goes down.. it gives me the error in my title.. what gives??
As for locating the source of that error, I suggest you to check Lee Mac's tutorial on debugging, since to locate the issue will need to review the entire code, not just an excerpt.
I will go that link and give it a shot, well i know that the pg_LN1 isn't a line entity, but all i am doing is replicating the change command as if i was doing it on an empty project, and where it asks for selecting objects, normally you would click on the line, but isn't clicking just choosing coordinates, so i used that variable as a coordinate because I know it will fall on the line, therefore selecting it.