say PImage frog; before setup()
like you say int loc you need to declare frog as a variable with a type.
Chrisir