it must be
AVS.push('ConditionalFilter(last, last.DeleteFrame(), last, "YDifferenceToNext()", "==", "0")');(watch the quotes and brackets)
Anyway "last.DeleteFrame()" is incorrect cause DeleteFrame must take the exact frame(s) number(s) to delete. It won't work as "delete current frame".