error: invalid conversion from 'const char*' to 'int'

Eg. int choice=yn_dialog(“Engage death ray now?”);

Yes, so why did you get rid of the variable that holds the response? The way you have it you are calling the function but discarding the result.