diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-03-04 18:48:28 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-03-04 18:48:28 +0000 |
commit | 1c85543bf1c6595533af20e682f48fe48977806a (patch) | |
tree | 4af188b759c1fd2564c10fb5e04c52e6e12fb3bb | |
parent | 44446b49ca05fe78ed74e2187c60d9810a2f737b (diff) | |
download | usdx-1c85543bf1c6595533af20e682f48fe48977806a.tar.gz usdx-1c85543bf1c6595533af20e682f48fe48977806a.tar.xz usdx-1c85543bf1c6595533af20e682f48fe48977806a.zip |
added error number to error.log and empty lines between the entries;
added check for note length<1
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2172 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 8 | ||||
-rw-r--r-- | Game/Code/Classes/ULog.pas | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 1af6e3a8..c2ec467f 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -699,6 +699,14 @@ begin end;
bt := Czesci[p].Czesc[line].Nuta[note].Start;
+ if (Czesci[p].Czesc[line].Nuta[note].Dlugosc<1) then
+ begin
+ Log.LogError('Note length <1 in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) +
+ ' in song ' + AktSong.Path + AktSong.Filename);
+ if (Ini.LoadFaultySongs=0) then
+ Result := false;
+ end;
+
if (note<numNotes-1) then
nextBeat := Czesci[p].Czesc[line].Nuta[note+1].Start
else if (line<numLines-1) then
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas index ed7855bd..8104b5b5 100644 --- a/Game/Code/Classes/ULog.pas +++ b/Game/Code/Classes/ULog.pas @@ -167,9 +167,10 @@ begin if FileErrorO then begin
try
- WriteLn(FileError, Text);
- Flush(FileError);
Inc(NumErrors);
+ WriteLn(FileError, IntToStr(NumErrors) + ') ' + Text);
+ WriteLn(FileError, '');
+ Flush(FileError);
except
FileErrorO := false;
end;
|