2 things, firstly to change a variable it must first actually be a variable,
You need to make logicA : logic = true
to var logicA : logic = true
Secondly in this instance setting this variable is not something that can fail and thus you shouldn’t put it in a failure context (your if() ) you can just have it as set logicA = false
by itself.