Simple programming question

Joe Why does the compiler give errors to:

(if(aMan:isStopped() and not aMan:isBlocked())

But not to:

(if((aMan:isStopped()) and not (aMan:isBlocked()))

Is it the same reason as why C compilers expect something like:

if ((bla == 5) || (bloo != 0)) {

?
Brian_Provinciano Send operations always require full brackets, not just in ifs. This is because they can take multiple params.

ie.
(send gEgo:
setSpeed(123)
setSomethingElse()
setThat(345)
)

so if you're sending just one param, it still works the same:

(aMan:
isStopped()
)

or

(aMan:isStopped())
Joe I'm going to just ask another question here to save space. What does 'angle' do?
Brian_Provinciano There is no "Angle" kernel or method. "GetAngle" takes two points and returns the angle of them.
Joe No, it's a global variable.

gPicAngle
Brian_Provinciano "angle" isn't a global variable either, hehe
   
gPicAngle is used to obtain the distance between two objects using the GetDistance() kernel. With gPicAngle, the GetDistance kernel operates like this:
   
disance = squareroot( (x1-x2)/ cosine(gPicAngle*3.14/180)) * (y1-y2) )