Meccano servo library.

Hello! so I just got some Meccano servos, as they are a great price. After doing some research I found a library for them from 2015. Whenever I try to use this library with my mega, I always get the error:

flexible array member ‘MeccaBrain::servo1Positions’ not at end of ‘class MeccaBrain’

I have tried rearranging the entirety of the .h file and still, get this error.

the .h file:

Meccano™, MeccaBrain™, MeccanoTech™ and Meccanoid™ are trademarks of Meccano. All rights reserved.
The information contained in this document is Proprietary to Spin Master Ltd.
This information should not be used in the creation and sale of any commercial product.”
#ifndef MeccaBrain_h
#define MeccaBrain_h

#include “Arduino.h”

class MeccaBrain{
MeccaBrain(int pin);

byte outputByteInfo(int num);
byte inputByteInfo();
byte inputBytesInfo(int servoNum);
byte checkSumByteInfo();
byte servoPositionsInfo(int servoNum);
char moduleTypeInfo(int num);
byte moduleNumInfo();
byte getLEDorder();
byte getLEDbyte1();
byte getLEDbyte2();

void setLEDColor(byte red, byte green, byte blue, byte fadetime);
void setServoColor(int servoNum, byte color);
void setServoPosition(int servoNum, byte pos);
void setServotoLIM(int servoNum);
byte getServoPosition(int servoNum);

void communicate();
void sendByte(byte servoData);
byte receiveByte();
byte calculateCheckSum(byte Data1, byte Data2, byte Data3, byte Data4);

int _pmwPin;
int servoNumber;
int inputCounter = 0;
int moduleNum = 0;
int printModNum = 0;
int ledOrder = 0;
int bitDelay = 417;
int receiveArray[8];
int servo1Positions;
int servo2Positions;
int servo3Positions;
int servo4Positions;

byte inputByte;
byte inputBytes;
byte checkSum;
byte servoPos;
byte LEDoutputByte1 = 0x00;
byte LEDoutputByte2 = 0x47;
byte header = 0xFF;
byte outputByte[4];
byte printOutputByte[4];

char moduleType[4];



MeccaBrain.cpp (9.74 KB)

MeccaBrain.h (1.62 KB)

I'm not going to download a library that I'll never use, just to see what the problem is. Post the .h and .cpp files that you downloaded, if you want help.