error: error: [string "Pen = class()..."]:19: attempt to index local 'self' (a number value)

Helo.
I’m getting error from title and don’t understand it.
Can you help me?

This is my class.

https://www.dropbox.com/s/vqifqhtjxi4vb1a/Photo%2005.11.2012%2023%2057%2042.png

This usually means that you’ve called a method using a dot instead of a colon. I expect that you have something like pen.forward(50) in your main code.

I can see an example of this on line 33 in what you’ve posted (compare with line 6), though this isn’t the cause of the specific error you’ve gotten.

Thanks. That fixed it.