Ok I managed to sort the syntax error, didnt close my brackets of properly, but now I am getting an Error 20 Predicate not defined:
! Error 20 : Predicate Not Defined
! Goal : bubblesort(_37214,_37216) :- swap(_37214,_37232),!,bubblesort(_37232,_37216)
Not sure what the numbers mean or...