下に直してみたのですが、やっぱり 「文字 '0x81'」 のエラーが出ます。

int buf[200];

int kan(){
int z ;

if( hoge&&hogehoge) {
    z = buf[0];
    return z;
//省略
}