But there is my confusion - the output of your code read 1,1,1,1 -was that intended? If so my confusion begins there.
Summary of my code:
I'm assigning a variable TLink to the first object in a list:
previousPathLink=previousPath.BallList.firstLink()
- this seems fine to me, iits getting a value (although is there a way of checking its what I would expect?)
Then (for debug purposes) I'm checking there are objects in the list:
Local a:Int=previousPath.ballList.count()
- which returns 3
Then I'm getting the value of what that link points to:
previousPathBall=TBall(previousPathLink.value())
- which appears to be fine
Then I'm comparing some values which if they are identical I am removing that link (and as I understand it object)
RemoveLink(previousPathLink )
But the first problem is that local variable a which I declared earlier does not change when I would expect it to decrement by 1.
Summary of my code:
I'm assigning a variable TLink to the first object in a list:
previousPathLink=previousPath.BallList.firstLink()
- this seems fine to me, iits getting a value (although is there a way of checking its what I would expect?)
Then (for debug purposes) I'm checking there are objects in the list:
Local a:Int=previousPath.ballList.count()
- which returns 3
Then I'm getting the value of what that link points to:
previousPathBall=TBall(previousPathLink.value())
- which appears to be fine
Then I'm comparing some values which if they are identical I am removing that link (and as I understand it object)
RemoveLink(previousPathLink )
But the first problem is that local variable a which I declared earlier does not change when I would expect it to decrement by 1.