mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-20 19:02:12 +00:00
Improved error reporting for invalid ZScript input
This commit is contained in:
parent
5f677e9ad6
commit
aee47aacb0
3 changed files with 9 additions and 3 deletions
|
@ -1780,9 +1780,11 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// Go for all opened containers
|
||||
foreach (DataReader dr in containers)
|
||||
{
|
||||
// Load Decorate info cumulatively (the last Decorate is added to the previous)
|
||||
// I'm not sure if this is the right thing to do though.
|
||||
currentreader = dr;
|
||||
// Load Decorate info cumulatively (the last Decorate is added to the previous)
|
||||
// I'm not sure if this is the right thing to do though.
|
||||
long t = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
|
||||
currentreader = dr;
|
||||
IEnumerable<TextResourceData> streams = dr.GetDecorateData("ZSCRIPT");
|
||||
foreach (TextResourceData data in streams)
|
||||
{
|
||||
|
@ -1801,6 +1803,8 @@ namespace CodeImp.DoomBuilder.Data
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DebugConsole.WriteLine(string.Format("Loading ZScript lumps from {0} took {1}ms", DateTimeOffset.Now.ToUnixTimeMilliseconds() - t));
|
||||
}
|
||||
|
||||
zscript.Finalize();
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
if (outs.Length > 0)
|
||||
{
|
||||
ZScriptToken tok = new ZScriptToken();
|
||||
tok.Position = cpos;
|
||||
tok.Type = ZScriptTokenType.String;
|
||||
tok.Value = outs;
|
||||
return tok;
|
||||
|
|
|
@ -735,6 +735,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
|
||||
// token not found.
|
||||
tok = new ZScriptToken();
|
||||
tok.Position = reader.BaseStream.Position;
|
||||
tok.Type = ZScriptTokenType.Invalid;
|
||||
tok.Value = "" + reader.ReadChar();
|
||||
tok.IsValid = false;
|
||||
|
|
Loading…
Reference in a new issue