Topic: [SOLVED] Modding and first steps - 'INVALID' is undeclared
Hi!
It's my first steps at modding. I wanted to make simple server mod where are some trash things
I tried to make my own weapon. There were a lot of problem in compiling. Finally I've got to the end of the problems (I think). I don't know, whether have I defined all variables etc. But when I am trying to compile source, the compiler says:
[21/64] #1 c++ src/game/generated/server_data.cpp
src/game/generated/server_data.cpp(488) : error C2065: 'INVALID' : undeclared id
entifier
src/game/generated/server_data.cpp(488) : error C2065: 'INVALID' : undeclared id
entifier
src/game/generated/server_data.cpp(488) : error C2065: 'INVALID' : undeclared id
entifier
bam: 'objs/game/generated/server_data.obj' error 2
Then I looked to that file (server_data.cpp). There was:
static CDataWeaponspec x2166[] = {
/* x2166[0] */ { "hammer", &x44[41], &x44[42], &x44[43], 0,x5033, 96, 125, 10, 0, 3, 4.000000, -20.000000, 0.000000, 0.000000, 5.000000, },
/* x2166[1] */ { "gun", &x44[26], &x44[27], &x44[28], 3,x5170, 64, 125, 10, 500, 1, 32.000000, -4.000000, 50.000000, 6.000000, 5.000000, },
/* x2166[2] */ { "shotgun", &x44[32], &x44[33], &x44[34], 3,x5355, 96, 500, 10, 0, 1, 24.000000, -2.000000, 70.000000, 6.000000, 5.000000, },
/* x2166[3] */ { "grenade", &x44[38], &x44[39], &x44[40], 0,x5540, 96, 500, 10, 0, 1, 24.000000, -2.000000, 0.000000, 0.000000, 5.000000, },
/* x2166[4] */ { "trap", &INVALID, &INVALID, &INVALID, 0,x5677, 64, 125, 10, 500, 1, 32.000000, -4.000000, 50.000000, 6.000000, 5.000000, },
/* x2166[5] */ { "rifle", &x44[47], &x44[48], &x44[49], 0,x5814, 92, 800, 10, 0, 5, 24.000000, -2.000000, 0.000000, 0.000000, 5.000000, },
/* x2166[6] */ { "ninja", &x44[44], &x44[45], &x44[46], 3,x5951, 96, 800, 10, 0, 9, 0.000000, 0.000000, 40.000000, -4.000000, 5.000000, },
};
I replaced INVALID parameters with gun parameters. After that I also had to do it in client_data.cpp. Why? Because after joining with normal client (ready to use binary from teeworlds.com) it says "Wrong version". So everybody who wants to join my server, needs my client
Can someone help me with removing those INVALID parameters?