know what's wrong?
He misspelled "resources" the member variable as "resource" the class. "farmproducing" is a non-static member variable of the "resource" class, thus it can only be accessed from objects of that class.