edit: it was an issue of using the template with an older version of renpy than listed in the template!
hm i'm not sure why you would get the error since by default clothing_i and category_i should be integers. if you'd share your project file as-is (via uploading to google drive or some other file transfer service & sending me a link to it at https://npckc.net/#contact i could take a look.