Variable out of Scope Issue

did you ever get this questioned answer? I am working on solving this for my self