When I try to compile this, I get this linker error:
LNK2001 unresolved external symbol "public: static int HooksXD::night" (?night@HooksXD@@2HA)
The header is this:
class HooksXD
{
public:
static void XD3();
static int night;
static int night2;
};
Variables are public not private because I need to access them from other voids witch are not in the same class.
The cpp file:
HooksXD lmao;
void HooksXD::XD3()
{
//this void will be called from other cpp files
lmao.night = 1;
lmao.night2 = 1;
};
bool __stdcall CreateMoveClient_Hooked(float frametime, CUserCmd* pCmd)
{
if (lmao.night = 1)
{
//some code
lmao.night++;
}
}
if (lmao.night = 1)is almost certainly wrong, that's an assignment, not a comparison. - Colin