this form of string handling is basically impossible to translate. You can use the "string_format()" function in stead, replacing `g->add_msg_if_player(` with something like `std::string msg = string_format(`.