Variables have scope; it matters where you declare a variable. The problem is that you are declaring your variable inside the if clauses. But you will probably want to declare it, and use it, outside the if clauses. For example:
var rollerSmall = false
var rollerMedium = false
if roller == "1" {
rollerSmall = true
}
if roller == "2" {
rollerMedium = true
}
// use rollerSmall and rollerMedium here
Having said all that, this is probably still a terrible way of doing whatever you are trying to do. You should not be encoding things in this flimsy way. If your roller can only have states small and medium, for example, that is an enum and you shouldn't have integer values and different variables at all.
rollerSmall
anywhere, thus the warning. What do you actually want to achieve with that code? – Cristik