I was told not to have global variables and given an example. Ifollowed it and now I get this error:only const static integral data members can be initialized inside a class or struct
on lines 50-85
#define STRICT
#define ORBITER_MODULE
#define ENG 1
#define START 2
#define STOP 3
#include <orbitersdk.h>
#include <cstdio>
#include <cmath>
#include <string>
#include "OrbiterSoundSDK3.h"
#include <stdio.h>
// ==============================================================
// Shuttle-PB class interface
// ==============================================================
class Chariot: public VESSEL2 {
public:
Chariot (OBJHANDLE hVessel, int flightmodel);
// : VESSEL2 (hVessel, flightmodel) {}
void clbkSetClassCaps (FILEHANDLE cfg);
void DefineAnimations(void);
void clbkPostCreation (void);
void clbkPreStep (double simt, double simdt, double mjd);
void clbkPostStep (double simt, double simdt, double mjd);
int clbkConsumeBufferedKey (DWORD key, bool down, char *kstate);
private:
double i = 0;
double i2 = 0.5;
double i2l = 0.5;
double i2r = 0.5;
double i3 = 0;
double t1 = 1;
double i4 = 0;
double i5 = 0;
double i6 = 0;
double st = 0;
double pld = 0;
double cen = 0;
double fb = 0;
double sign = 0;
double pit2 = 200;
double sp = 190;
int start = 0;
double i8 = 0;
double main_on = 0;
double retro_on = 0;
THRUSTER_HANDLE th_main;
THRUSTER_HANDLE th_retro;
THRUSTER_HANDLE th_rcs[4], th_group[2];
UINT animactive6;
UINT animactive5;
UINT animactive7;
UINT animactive8;
UINT animactive9;
UINT animactive10;
int MySoundID;
double canopy = 0;
double lfdoor = 0;
double lrdoor = 0;
double rfdoor = 0;
double rrdoor = 0;
double rhatch = 0;
UINT anim_wheel;
UINT anim_wheelleft;
UINT anim_wheelright;
UINT anim_wheelleftrev;
UINT anim_wheelrightrev;
UINT anim_leverleft;
UINT anim_leverright;
UINT anim_lfdoor;
UINT anim_dome;
UINT anim_lrdoor;
UINT anim_rfdoor;
UINT anim_rrdoor;
UINT anim_rhatch;
};
Chariot::Chariot (OBJHANDLE hVessel, int flightmodel)
: VESSEL2 (hVessel, flightmodel)
{
DefineAnimations ();
}