General.ErrorLogger.Add(ErrorType.Warning,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+skyType+" scroll speed value, but got '"+token+"'");
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
continue;
}
if(skyType=="sky1")
mapInfo.Sky1ScrollSpeed=scrollSpeed;
else
mapInfo.Sky2ScrollSpeed=scrollSpeed;
}else{
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
}
}else{
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
General.ErrorLogger.Add(ErrorType.Error,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+skyType+" texture name.");
}
//old format
}else{
//token should be sky1/2 name
if(!string.IsNullOrEmpty(token)){
if(skyType=="sky1")
mapInfo.Sky1=token;
else
mapInfo.Sky2=token;
//try to read scroll speed
SkipWhitespace(true);
token=StripTokenQuotes(ReadToken());
floatscrollSpeed=0;
if(!ReadSignedFloat(token,refscrollSpeed)){
// Not numeric!
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
continue;
}
if(skyType=="sky1")
mapInfo.Sky1ScrollSpeed=scrollSpeed;
else
mapInfo.Sky2ScrollSpeed=scrollSpeed;
}else{
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
General.ErrorLogger.Add(ErrorType.Error,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+skyType+" texture name.");
General.ErrorLogger.Add(ErrorType.Error,"Failed to parse "+fadeType+" value from string '"+colorVal+"' in "+sourcename+"' at line "+GetCurrentLineNumber());
General.ErrorLogger.Add(ErrorType.Error,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+fadeType+" color value.");
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
General.ErrorLogger.Add(ErrorType.Error,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+shadeType+" value, but got '"+token+"'");
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again
General.ErrorLogger.Add(ErrorType.Error,"Unexpected token found in '"+sourcename+"' at line "+GetCurrentLineNumber()+": expected "+densityType+" value, but got '"+token+"'");
datastream.Seek(-token.Length-1,SeekOrigin.Current);//step back and try parsing this token again