1

Topic: New 0.7 source & json filetype doesn't working

Hey,
I want to compile the new source of 0.7. But I have a lot of errors with the json filetype...
And I tried to download the version, and it says: 'teeworlds.exe is not a valid Win32 Application'
Source build:

[1/5] #1 c++ src/game/client/components/countryflags.cpp
src/game/client/components/countryflags.cpp(63) : error C2666: '_json_value::ope
rator []' : 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/client/components/countryflags.cpp(72) : error C2666: '_json_value::ope
rator []' : 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
bam: 'objs/game/client/components/countryflags.obj' error 2
[2/5] #1 c++ src/game/client/components/menus_settings.cpp
src/game/client/components/menus_settings.cpp(590) : error C2666: '_json_value::
operator []' : 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/client/components/menus_settings.cpp(591) : error C2666: '_json_value::
operator []' : 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/client/components/menus_settings.cpp(591) : error C2666: '_json_value::
operator []' : 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
bam: 'objs/game/client/components/menus_settings.obj' error 2
[3/5] #1 c++ src/game/client/localization.cpp
src/game/client/localization.cpp(90) : error C2666: '_json_value::operator []' :
 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/client/localization.cpp(90) : error C2666: '_json_value::operator []' :
 2 overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
bam: 'objs/game/client/localization.obj' error 2
[4/5] #1 c++ src/game/editor/auto_map.cpp
src/game/editor/auto_map.cpp(12) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(12) : error C2228: left of '.u' must have class/str
uct/union
src/game/editor/auto_map.cpp(12) : error C2228: left of '.object' must have clas
s/struct/union
src/game/editor/auto_map.cpp(12) : error C2228: left of '.length' must have clas
s/struct/union
src/game/editor/auto_map.cpp(17) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(17) : error C2228: left of '.u' must have class/str
uct/union
src/game/editor/auto_map.cpp(17) : error C2228: left of '.object' must have clas
s/struct/union
src/game/editor/auto_map.cpp(17) : error C2228: left of '.values' must have clas
s/struct/union
src/game/editor/auto_map.cpp(17) : error C2228: left of '.name' must have class/
struct/union
src/game/editor/auto_map.cpp(19) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(19) : error C2228: left of '.u' must have class/str
uct/union
src/game/editor/auto_map.cpp(19) : error C2228: left of '.object' must have clas
s/struct/union
src/game/editor/auto_map.cpp(19) : error C2228: left of '.values' must have clas
s/struct/union
src/game/editor/auto_map.cpp(19) : error C2228: left of '.value' must have class
/struct/union
src/game/editor/auto_map.cpp(36) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(43) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(50) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(57) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(64) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(71) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(78) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(78) : error C2228: left of '.u' must have class/str
uct/union
src/game/editor/auto_map.cpp(78) : error C2228: left of '.integer' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(79) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(79) : error C2228: left of '.u' must have class/str
uct/union
src/game/editor/auto_map.cpp(79) : error C2228: left of '.integer' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(80) : error C2666: '_json_value::operator []' : 2 o
verloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(219) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(219) : error C2228: left of '.u' must have class/st
ruct/union
src/game/editor/auto_map.cpp(219) : error C2228: left of '.object' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(219) : error C2228: left of '.length' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(224) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(224) : error C2228: left of '.u' must have class/st
ruct/union
src/game/editor/auto_map.cpp(224) : error C2228: left of '.object' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(224) : error C2228: left of '.values' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(224) : error C2228: left of '.name' must have class
/struct/union
src/game/editor/auto_map.cpp(226) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(226) : error C2228: left of '.u' must have class/st
ruct/union
src/game/editor/auto_map.cpp(226) : error C2228: left of '.object' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(226) : error C2228: left of '.values' must have cla
ss/struct/union
src/game/editor/auto_map.cpp(226) : error C2228: left of '.value' must have clas
s/struct/union
src/game/editor/auto_map.cpp(236) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(243) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(254) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(261) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(273) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(280) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(287) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
src/game/editor/auto_map.cpp(295) : error C2666: '_json_value::operator []' : 2
overloads have similar conversions
        src\engine/external/json-parser/json.h(130): could be 'const _json_value
 &_json_value::operator [](int) const'
        or 'built-in C++ operator[(const char *, unsigned int)'
        while trying to match the argument list '(const json_value, unsigned int
)'
bam: 'objs/game/editor/auto_map.obj' error 2
bam: error: a build step failed

--------------
My operating system: Windows XP 32-bit

I'm a god.

2

Re: New 0.7 source & json filetype doesn't working

what compiler are you using?

3 (edited by PhOen!X' 2013-03-25 15:55:08)

Re: New 0.7 source & json filetype doesn't working

Visual C++?

I'm a god.

4 (edited by BeaR 2013-03-25 16:13:22)

Re: New 0.7 source & json filetype doesn't working

could you please tell me also which version big_smile

oy already tested it on xp with vs2008 and mingw and it worked

5

Re: New 0.7 source & json filetype doesn't working

I using Visual Studio 2005 (Visual Studio 8)

I'm a god.

6

Re: New 0.7 source & json filetype doesn't working

Can't really find anything suspicious in the code, probably a compiler bug IMHO
I would advice you to install a newer version.

7

Re: New 0.7 source & json filetype doesn't working

Ok, I maybe try VS 2010 later. Thanks for your answer.

I'm a god.