This error is telling you that bunkernameStore is nil and isn’t a valid variable. Make sure you’ve clearly defined bunkernameStore within the scope earlier in the script and that you’ve spelled it correctly (CASE SENSITIVE).
It says that bunkernamestore is only used in the enclosing function and suggests i change it to local. I’m not sure why it doesnt recognize the variable, i copied and pasted the variable to make sure it wasnt a typo.