05.11.2013, 21:17
Hey.
I need help
[17:23:04] >> mysql_query( Connection handle: 1 )
[17:23:04] CMySQLHandler::Query(SELECT * FROM `Rennen` WHERE `ID` = '1') - Successfully executed.
[17:23:04] >> mysql_store_result( Connection handle: 1 )
[17:23:04] CMySQLHandler::StoreResult() - Result was stored.
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Ersteller) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Kartenname) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzA) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzB) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzC) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzD) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzE) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Checkpoint) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_retrieve_row( Connection handle: 1 )
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField("Spawnpunkt") - 2845.36181|-1136.51110|12.09641|95.49764*2847.27075|-1141.77624|11.87478|95.09066*2855.97485|-1134.69909|10.90054|91.12202*2855.73461|-1141.01879|10.92381|95.08444*2835.21362|-1137.50451|13.26394|95.60161*2834.95385|-1143.72216|13.19385|94.87988
Code:
public LoadARace()
{
new Ausgabe[100][100];
new AusgabeC[100][100];
new ZwischenSpeicher[100];
mysql_free_result();
mysql_query("SELECT * FROM `Rennen`");
mysql_store_result();
if(mysql_num_rows() > NextRace)
{
NextRace++;
}
else
{
NextRace = 1;
}
printf("ID vom naechsten Rennen: %d",NextRace);
mysql_free_result();
format(query,sizeof(query),"SELECT * FROM `Rennen` WHERE `ID` = '%d'",NextRace);
mysql_query(query);
mysql_store_result();
new result[50];
mysql_fetch_field_row(result,"Ersteller");
format(RaceInfo[rErsteller],MAX_PLAYER_NAME,result);
mysql_fetch_field_row(result,"Kartenname");
format(CurrentRace,sizeof(CurrentRace),result);
mysql_fetch_field_row(result,"PlatzA");
split(result,Ausgabe,'|');
format(RaceBestName[0],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][0] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzB");
split(result,Ausgabe,'|');
format(RaceBestName[1],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][1] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzC");
split(result,Ausgabe,'|');
format(RaceBestName[2],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][2] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzD");
split(result,Ausgabe,'|');
format(RaceBestName[3],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][3] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzE");
split(result,Ausgabe,'|');
format(RaceBestName[4],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][4] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"Checkpoint");
split(result,AusgabeC,'*');
RaceInfo[MaxCheckpoints] = 0;
forEx(i,100)
{
format(ZwischenSpeicher,100,"%s",AusgabeC[i]);
if(strlen(ZwischenSpeicher) == 0) continue;
format(Ausgabe[3],100,"-1");
split(ZwischenSpeicher,Ausgabe,'|');
RaceInfo[CheckpointX][i] = floatstr(Ausgabe[0]);
RaceInfo[CheckpointY][i] = floatstr(Ausgabe[1]);
RaceInfo[CheckpointZ][i] = floatstr(Ausgabe[2]);
RaceInfo[CheckpointModell][i] = strval(Ausgabe[3]);
strdel(ZwischenSpeicher, 0, sizeof(ZwischenSpeicher));
RaceInfo[MaxCheckpoints]++;
}
forEx(i,sizeof(AusgabeC)) format(AusgabeC[i],100," ");
mysql_fetch_field_row(result,"Spawnpunkt");
split(result,AusgabeC,'*');
RaceInfo[MaxRacePlayers] = 0;
forEx(i,100)
{
format(ZwischenSpeicher,100,"%s",AusgabeC[i]);
if(strlen(ZwischenSpeicher) <= 1) continue;
format(Ausgabe[4],100,"-1");
split(ZwischenSpeicher,Ausgabe,'|');
RaceInfo[SpawnpointX][i] = floatstr(Ausgabe[0]);
RaceInfo[SpawnpointY][i] = floatstr(Ausgabe[1]);
RaceInfo[SpawnpointZ][i] = floatstr(Ausgabe[2]);
RaceInfo[SpawnpointA][i] = floatstr(Ausgabe[3]);
RaceInfo[CheckpointModell][i] = strval(Ausgabe[4]);
strdel(ZwischenSpeicher, 0, sizeof(ZwischenSpeicher));
RaceInfo[MaxRacePlayers]++;
}
mysql_free_result();
return true;
}
I need help

[17:23:04] >> mysql_query( Connection handle: 1 )
[17:23:04] CMySQLHandler::Query(SELECT * FROM `Rennen` WHERE `ID` = '1') - Successfully executed.
[17:23:04] >> mysql_store_result( Connection handle: 1 )
[17:23:04] CMySQLHandler::StoreResult() - Result was stored.
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Ersteller) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Kartenname) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzA) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzB) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzC) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzD) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(PlatzE) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField(Checkpoint) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[17:23:04] >> mysql_retrieve_row( Connection handle: 1 )
[17:23:04] >> mysql_fetch_field_row( Connection handle: 1 )
[17:23:04] CMySQLHandler::FetchField("Spawnpunkt") - 2845.36181|-1136.51110|12.09641|95.49764*2847.27075|-1141.77624|11.87478|95.09066*2855.97485|-1134.69909|10.90054|91.12202*2855.73461|-1141.01879|10.92381|95.08444*2835.21362|-1137.50451|13.26394|95.60161*2834.95385|-1143.72216|13.19385|94.87988
Code:
public LoadARace()
{
new Ausgabe[100][100];
new AusgabeC[100][100];
new ZwischenSpeicher[100];
mysql_free_result();
mysql_query("SELECT * FROM `Rennen`");
mysql_store_result();
if(mysql_num_rows() > NextRace)
{
NextRace++;
}
else
{
NextRace = 1;
}
printf("ID vom naechsten Rennen: %d",NextRace);
mysql_free_result();
format(query,sizeof(query),"SELECT * FROM `Rennen` WHERE `ID` = '%d'",NextRace);
mysql_query(query);
mysql_store_result();
new result[50];
mysql_fetch_field_row(result,"Ersteller");
format(RaceInfo[rErsteller],MAX_PLAYER_NAME,result);
mysql_fetch_field_row(result,"Kartenname");
format(CurrentRace,sizeof(CurrentRace),result);
mysql_fetch_field_row(result,"PlatzA");
split(result,Ausgabe,'|');
format(RaceBestName[0],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][0] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzB");
split(result,Ausgabe,'|');
format(RaceBestName[1],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][1] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzC");
split(result,Ausgabe,'|');
format(RaceBestName[2],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][2] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzD");
split(result,Ausgabe,'|');
format(RaceBestName[3],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][3] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"PlatzE");
split(result,Ausgabe,'|');
format(RaceBestName[4],MAX_PLAYER_NAME,Ausgabe[0]);
RaceInfo[Bestzeit][4] = strval(Ausgabe[1]);
mysql_fetch_field_row(result,"Checkpoint");
split(result,AusgabeC,'*');
RaceInfo[MaxCheckpoints] = 0;
forEx(i,100)
{
format(ZwischenSpeicher,100,"%s",AusgabeC[i]);
if(strlen(ZwischenSpeicher) == 0) continue;
format(Ausgabe[3],100,"-1");
split(ZwischenSpeicher,Ausgabe,'|');
RaceInfo[CheckpointX][i] = floatstr(Ausgabe[0]);
RaceInfo[CheckpointY][i] = floatstr(Ausgabe[1]);
RaceInfo[CheckpointZ][i] = floatstr(Ausgabe[2]);
RaceInfo[CheckpointModell][i] = strval(Ausgabe[3]);
strdel(ZwischenSpeicher, 0, sizeof(ZwischenSpeicher));
RaceInfo[MaxCheckpoints]++;
}
forEx(i,sizeof(AusgabeC)) format(AusgabeC[i],100," ");
mysql_fetch_field_row(result,"Spawnpunkt");
split(result,AusgabeC,'*');
RaceInfo[MaxRacePlayers] = 0;
forEx(i,100)
{
format(ZwischenSpeicher,100,"%s",AusgabeC[i]);
if(strlen(ZwischenSpeicher) <= 1) continue;
format(Ausgabe[4],100,"-1");
split(ZwischenSpeicher,Ausgabe,'|');
RaceInfo[SpawnpointX][i] = floatstr(Ausgabe[0]);
RaceInfo[SpawnpointY][i] = floatstr(Ausgabe[1]);
RaceInfo[SpawnpointZ][i] = floatstr(Ausgabe[2]);
RaceInfo[SpawnpointA][i] = floatstr(Ausgabe[3]);
RaceInfo[CheckpointModell][i] = strval(Ausgabe[4]);
strdel(ZwischenSpeicher, 0, sizeof(ZwischenSpeicher));
RaceInfo[MaxRacePlayers]++;
}
mysql_free_result();
return true;
}