Inserting ints into a menu string

I’ve been working on my Clothing PR and I figured this was a better place to ask a question than my already long Github PR page. I’ve been trying to add a little note at the end of each menu option to show how much that stat would improve. I’ve got the idea down, I think, and my code compiles, but when I get to that menu, the game crashes. I tried looking around for a place this was already done, but the closest I could find was the install bionic query that shows you the percent chance of success, so I based it off of that.

int choice = menu(true, _("How do you want to modify it?"), _("Add extra straps and pockets (+ %i storage)"), _("Line it with fur (+ %i warmth)"),_("Pad with leather (+ %i resist)"),_("Line with kevlar (+ %i resist)"),_("Cancel"), stor_mod, warm_mod, l_mod, k_mod);

Is what I’m trying to do here even possible?

That simply won’t work. You can either use the [tt]uimenu[/tt] class directly like many other code (e.g. [tt]iuse::knife[/tt]), or create the strings with [tt]string_format[/tt] and store them in temporary variables:

const auto opt0 = string_format( ... );
const auto opt1 = string_format( ... ); // Don't forget the translation here
int choice = menu(true, _("How do you want to modify it?"), opt0.c_str(), opt1.c_str());