rt.getName()
error C2228: left of '.getName' must have class/struct/union
type is 'const Glest::ProtoTypes::ResourceType *'
did you intend to use '->' instead?
Theres the above thats used. to go through the resources, but how do i know which is gold or wood? Theres the ResourceType but that is one of
Just to clarify, a ResourceType represents a resource available in the techtree, the 'tech', 'tileset', 'static', 'consumable' thing is a ResourceClass (and each ResourceType is of exactly one ResourceClass).
As hailstone pointed out, you can get the name as a string and compare that, but it seems very specific, as hailstone also hinted at. I realise you have a time-frame to work within, and want to keep things as simple as possible, but I would suggest treating all resources of class tech-tree and tileset the same. They are resources you can harvest, when you look at the 'costs' for units (in code), you will end up looking at the same things,
const ResourceType*.
So there is really no need know which is 'gold' or 'stone' or whatever, you need X amount of Y to produce something you want to produce, so make harvesting Y a priority.
That's obviously a simplification, in reality you will need two or three different resource types to build something, and you will be considering building more than one thing, but adding all those costs up, you will get an idea of what 'balance' of harvesting you need to do. And you wont need to know which is 'gold'
Stop thinking like a human !