When you create a switch or other widget on the Interface, NetLogo uses that to define a global variable with the same name. Therefore, when you define the variable as a global in your code, it is a redundant definition. Thus the error you are getting.