Re: sql file for DDNet
Posted: Tue Sep 22, 2015 12:28 pm
but i have windowsdeen wrote:apt-get install libboost-dev
how get this for windows ?
DDraceNetwork Forum
https://forum.ddnet.org:443/
but i have windowsdeen wrote:apt-get install libboost-dev
deen can u upload this for me ?deen wrote:Most don't need it and it's ~30 MB that you would have to download with every update. If you can't compile the SQL server, you'll have even bigger trouble using it.
Code: Select all
[2/3] #1 c++ src/game/server/score/sql_score.cpp
src/game/server/score/sql_score.cpp(839) : error C2057: expected constant expres
sion
src/game/server/score/sql_score.cpp(839) : error C2466: cannot allocate an array
of constant size 0
src/game/server/score/sql_score.cpp(839) : error C2133: 'aCuts' : unknown size
src/game/server/score/sql_score.cpp(1224) : error C2057: expected constant expre
ssion
src/game/server/score/sql_score.cpp(1224) : error C2466: cannot allocate an arra
y of constant size 0
src/game/server/score/sql_score.cpp(1224) : error C2133: 'newString' : unknown s
ize
bam: 'objs/game/server/score/sql_score_sql.obj' error 2
bam: error: a build step failed
-------------------------------------------------
Line 839:
int aCuts[Rows];
-------------------------------------------------
Line 1224:
char newString[size*2-1];
you did wrongdeen wrote:My bad, should be fixed on Github: http://git.io/vno0c
Code: Select all
void CSqlScore::ClearString(char *pString, int size)
{
char newString[size*2-1];
int pos = 0;
for(int i=0;i<size;i++)
{
if(pString[i] == '\\')
{
newString[pos++] = '\\';
newString[pos++] = '\\';
}
else if(pString[i] == '\'')
{
newString[pos++] = '\\';
newString[pos++] = '\'';
}
else if(pString[i] == '"')
{
newString[pos++] = '\\';
newString[pos++] = '"';
}
else
{
newString[pos++] = pString[i];
}
}
newString[pos] = '\0';
strcpy(pString,newString);
}