We take out x, y, z in ofVec3f set by ofParameter individually

We take out x, y, z in ofVec3f set by ofParameter individually.

ofParameter <ofVec3f> position

If you do, extracting x in position is

position.x

So I get an error, what should I do?

You can get the position x like this.

position.get().x;

you can also call:

position->x

but in both cases (using get or ->) only for reading it. you can’t modify individual components of a parameter or call methods on it that would change it, if you want to modify it you need to rewrite it completely like:

ofVec3f p2 = position;
p2.x = 3;
position = p2;