Noob global, local and pointed variables question

Maybe this tutorial on scope will help.