Probier doch einfach mal:

#MeinFunc
a = 77
b = 77
if not a=b then print "Fehler: a ungleich b" else goto FuncEnde
#FuncEnde
return