User blog comment:Florence100 the Sylveon/Chespin uploaded!/@comment-3207219-20130806023106/@comment-6040145-20130806131001

ifelse doesnt take strings as arguments, so ifelse(facing=1,left,right) isn't going to work.

Just use postype = p1. Simple as that.