Log in

View Full Version : error in world.exe...start_zones


Cripp
11-18-2003, 07:28 AM
to the point...

[error] Database: Could not find start_zones entry in database. Using Defaults..


WTF is this? i have start_zones table in database...
and is it even a big enough problem to deal with or is it fine to just let it be :D

thanks--
Cripp Nugs

bud9weiser
11-18-2003, 08:06 AM
Their is a bug in the code that couses this, search forums for "start_zones" and thier is a nice fix. Im currently working on a "start_zones" table in the format from the fix, and should have it ready for TCS's next database release

Cripp
11-18-2003, 11:25 AM
k went to the forum where it says how to fix, i replace the code in
database.cpp where it says to and i just get a bunch of errors...

--------------------Configuration: Zone - Win32 Release--------------------
Compiling...
database.cpp
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 583) : error C2143: syntax error : missing ';' before 'else'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 583) : error C2143: syntax error : missing ';' before '{'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 583) : error C2447: missing function header (old-style formal list?)
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2501: 'in_pp' : missing storage-class or type specifiers
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2501: 'in_pp' : missing storage-class or type specifiers
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2086: 'in_pp' : redefinition
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2501: 'in_pp' : missing storage-class or type specifiers
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2086: 'in_pp' : redefinition
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 587) : error C2143: syntax error : missing ';' before '->'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 588) : error C2143: syntax error : missing ';' before 'switch'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 589) : error C2143: syntax error : missing ';' before '{'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 589) : error C2447: missing function header (old-style formal list?)
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 675) : error C2143: syntax error : missing ';' before 'return'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 676) : error C2143: syntax error : missing ';' before '}'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 676) : error C2143: syntax error : missing ';' before '}'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 676) : error C2143: syntax error : missing ';' before '}'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 681) : error C2143: syntax error : missing ';' before '{'
C:\eqemu\cvs\eqemu\NewSource\common\database.cpp(6 681) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.

Zone.exe - 23 error(s), 0 warning(s)

here is part of my database.cpp where errors occur...

if (RunQuery(query, MakeAnyLenString(&query, "SELECT x,y,z,zone_id,bind_id FROM start_zones WHERE player_choice=%i and player_class=%i and player_deity=%i and player_race=%i", in_cc->start_zone, in_cc->class_, in_cc->deity, in_cc->race), errbuf, &result)) {
safe_delete_array(query);

if (mysql_num_rows(result) != 0) {
row = mysql_fetch_row(result);
in_pp->y = atoi(row[0]);
in_pp->x = atoi(row[1]);
in_pp->z = atoi(row[2]);
in_pp->zone_id = atoi(row[3]);
in_pp->bind_zone_id = atoi(row[4]);
mysql_free_result(result);
return true;
}
}
else {
LogFile->write(EQEMuLog::Error, "Database: could not find start_zones entry in database. Using Defaults..");
}
mysql_free_result(result);
}
else {
LogFile->write(EQEMuLog::Error, "Database: could not find start_zones table in database. Using Defaults..");
safe_delete_array(query);
}
in_pp->x = 0; in_pp->y = 0; in_pp->z = 0;
switch(in_cc->start_zone)
{

any help here would be awsome.

thanks
cripp

11-18-2003, 11:41 AM
Without the whole source file and line numbers, it is hard to say, but:

if (mysql_num_rows(result) != 0) {
row = mysql_fetch_row(result);
in_pp->y = atoi(row[0]);
in_pp->x = atoi(row[1]);
in_pp->z = atoi(row[2]);
in_pp->zone_id = atoi(row[3]);
in_pp->bind_zone_id = atoi(row[4]);
mysql_free_result(result);
return true;
}
} // <------- Try deleting this



You may have an extraneous end brace there. Try deleting that.

arkaria
11-18-2003, 11:48 AM
an extraneous end brace would result in a compile error I would think.

11-18-2003, 11:52 AM
an extraneous end brace would result in a compile error I would think.

Yup, those syntax errors he lists are compile errors.

arkaria
11-18-2003, 12:07 PM
Oh lol I was reading up to high. Didn't look close enough to the subsiquent posts. My bad

11-18-2003, 12:10 PM
No worries Arkaria, I thought that is what happened ... if you ever see a post by me that say 'n/t', it happened to me too :)

Cripp
11-18-2003, 03:02 PM
You may have an extraneous end brace there. Try deleting that

checked, didnt see any brace there.. want me to send the whole database.cpp code?

ndnet
11-18-2003, 06:51 PM
The extra brace was quoted from the source which you originally quoted. Unless you've already deleted it, or you somehow added it incorrectly when quoting the source, the brace should still be there ^.^

Cripp
11-19-2003, 10:16 AM
ah im a moron, i got it i thought he meant delete the two forward slashes. LOL stupid me.
thanks it worked now :):):) 8) thanks alot

-Cripp Nugs

11-19-2003, 10:18 AM
Sorry for the confusion Cripp, glad it fixed your problem. :D