More class help

How would you do something like
If self.x<0 then

What exactly are you asking? Are you trying to call a functions if the variable self.x < 0? Also, what class is the self.x inside of?
As a side note- The word ‘end’ should not be capitalized

Yes how would you call a class function in a different class?

Well, you can do either.

pts = Pts()
pts.cpu(). -- multiple instance of the pts

– or –

 -- called upon the static class instance. Use if you have something like self.value declared in init(),

As @edat said, both are valid, so it comes down to what you are trying to accomplish.

I’m having trouble understanding sorry?

Ok let’s say in class Class1 self.x = 0 and I wanted to check if self.x is bigger than 0 in class Class2?

This is most likely wrong, but its the only way i could think of

Class1 = class()
function Class1:init()
self.x = math.random(1,10)
function Class1:setup"self.x")

Class2 = class()
function Class2:init()
if self.x > 0 then
If self.x < 0 then

Like i said, its most likely wrong, but hey, im learning

Yea that doesn’t work I’m afraid

Didnt think so