Hallo ich habe ein problem,
ich habe script und es lädet zufallsrennen von einer datei.
aber es funktioniert nicht. im server window sollte stehen "Race: Testrace", aber es steht nur "Race:" dort. Für einen test habe ich "race.txt" in scriptfiles getan und dort den Inhalt aber es geht auch nicht.
forward RaceLoad();
public LadeRennen()
{
new var[32];
new File: file = fopen("race.txt", io_read);
if(file)
{
format(var, 32, "%f", RaceInfo[rCP1][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP1][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP1][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP2][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP2][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP2][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP3][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP3][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP3][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP4][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP4][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP4][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP5][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP5][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP5][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP6][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP6][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP6][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP7][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP7][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP7][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP8][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP8][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP8][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP9][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP9][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP9][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP10][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP10][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP10][2]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP11][0]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP11][1]);fread(file, var);
format(var, 32, "%f", RaceInfo[rCP11][2]);fread(file, var);
format(var, 32, "%s", RaceInfo[rRekordName]);fread(file, var);
format(var, 32, "%s", RaceInfo[rName]);fread(file, var);
format(var, 32, "%d", RaceInfo[rBestms]);fread(file, var);
fclose(file);
}
printf("Race: %s",RaceInfo[rName]);
return 1;
}
Bitte helft mit..
MfG PhiL