Variable not defined in current scope

please check if an appropriiate default value is set for the variable