Yes, but you wont be able to run it ;-)
Ok the code searches through 3 lists to see if the objects are of the same colour.
On the first iteration it gets to the PlaySound sPop statement, assigned the links again then returns to the first IF statement within the While loop and the error pops up where I've put the asterix
Ok the code searches through 3 lists to see if the objects are of the same colour.
On the first iteration it gets to the PlaySound sPop statement, assigned the links again then returns to the first IF statement within the While loop and the error pops up where I've put the asterix
Method Search_MultiplePaths() Local currentPathBall:TBall, previousPathBall:TBall, nextPathBall:TBall Local currentPathLink:TLink, previousPathLink:TLink, nextPathLink:TLink previousPathLink=previousPath.BallList.firstLink() currentPathLink=ballList.FirstLink() nextPathLink=nextPath.ballList.firstLink() DebugStop While previousPath.ballList.count()>0 And ballList.count()>0 And Nextpath.ballList.count()>0 If previousPathLink And currentPathLink And NextpathLink previousPathBall=TBall(previousPathLink.value()) ' **ERROR GENERATED HERE 2nd TIME ROUND currentPathBall=TBall(currentPathLink.value()) nextPathBall=TBall(nextPathLink.value()) If previousPathBall.colour = currentPathBall.colour And currentPathBall.colour=nextPathBall.colour RemoveLink(previousPathLink ) RemoveLink(currentPathLink ) RemoveLink(NextpathLink) PlaySound sPop previousPathLink =previousPath.BallList.firstLink() currentPathLink =ballList.FirstLink() NextpathLink=nextPath.ballList.firstLink() Else 'increment the links to the next ball in the list previousPathLink=previousPathLink.NextLink() currentPathLink=currentPathLink.NextLink() nextPathLink=nextPathLink.NextLink() EndIf EndIf Wend EndMethod