Move the declaration for temp_scent inside the loop where it's used.