[SOLVED]class member of derived class does not name a type

Hello, I am used to us derived classes like this for a while but I just do not understand where this error comes from:

Animation.h, parent class:

#ifndef ANIMATION_H
#define ANIMATION_H
#include "Arduino.h"
#include "utilities.h"
class animation
{
public:
	animation() {}

	void init (utilities * u) { utils = u; }

	virtual void render() = 0;
	
	int wait;  //These
	int step;  //are
	int duration;  //the problem

	RGB24B colorone;  //and this one

	utilities * utils;
};
#endif

Test.h:

#ifndef TEST_H
#define TEST_H
#include "Arduino.h"
#include "animation.h"
class test : public animation
{
public:
	test(int w)
	{
		wait = w;
	}

	virtual void render()
	{
		utils->clearLEDs(true);
		for (int i = 0; i < utils->numLeds; i++)
		{
			utils->setLED(i, 255, 255, 255);
			utils->setLED(i - 1, 0, 0, 0);
			utils->show();
			if (utils->checkdelay(wait))
				return;
		}
		utils->clearLEDs(true);
	}

	wait = 20;  //Throws error
};
#endif

error:

Test.h: 27:2: error: 'wait' does not name a type
Error compiling project sources
   wait = 20

I just do not understand, why this is a problem… Accessing the inherited utilities pointer works just fine.

wait = 20;

Is that supposed to be an assignment or a definition / initialization?

If the former, it's not inside a function.

If the latter, then you must supply a type for the variable 'wait' (in which case it will shadow the variable of the same name in the base class).

gfvalvo:

wait = 20;

Is that supposed to be an assignment or a definition / initialization?

If the former, it’s not inside a function.

If the latter, then you must supply a type for the variable ‘wait’ (in which case it will shadow the variable of the same name in the base class).

Ah right, Thank You. Makes sense. It is supposed to be the first.