[Fixed]Please help! Errors only in modified source version!

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

[Fixed]Please help! Errors only in modified source version!

Post by Xane123 »

Recently, I decided I'd just merge the latest GZDoom commits into my modified version for my game; I thought it'd be a smooth experience with no problems, but after I merged all the changes and compiled the source code, this strange error message pair came up every time I would try to start it up:

Code: Select all

Script error, "engine.pk3:zscript/base.txt" line 583:
Unexpected '<'
Expecting ';' or ','

Script error, "engine.pk3:zscript/mapdata.txt" line 337:
Unexpected identifier
Expecting ';' or ','


Execution could not continue.

2 errors while parsing engine.pk3:zscript/chex/chexplayer.txt
Now, I thought at this point I didn't update a file in my version as my workflow consists of having a GZDoom fork folder and a separate folder I copy all changes to afterwards. I copied the whole /wadsrc/static/zscript folder from GZDoom's own gzdoom.pk3 then re-compiled to update my PK3...still the same errors; GItHub Desktop didn't report any files had changed, meaning all ZScript files should be up to date.

I even tried using GZDoom's actual gzdoom.pk3 file...same errors! I then guessed it must be a source code error, but even after deleting and re-forking GZDoom, then compiling that...same errors! There shouldn't be any ZScript errors if the source code is up to date and the PK3 has mostly unmodified files... (I only changed the "skies.txt" and "powerups.txt" to allow moving skyboxes and fix the speed powerup not respecting my "speed" property on my custom powerup, but that's it!)

Even after all that, the errors still appear, preventing me from playing and testing my game on my modified executable, but GZDoom's official EXE starts up fine! How can identical source code in all ZScript-related files somehow cause errors on my own version? Ranting aside, someone please tell me what's happening and how to fix these not-normal errors so I can get my game's executable up to date. My barely-modified fork is located here.

The two places it complains about look fine to me!
/zscript/base.txt, line 583

Code: Select all

	native Array<@Side> Sides;
	native readonly Array<@Vertex> Vertexes;
	native internal Array<@SectorPortal> SectorPortals;
	
	native readonly int time;
/zscript/mapdata.txt, line 337

Code: Select all

	native SectorAction		SecActTarget;

	native internal uint		Portals[2];
	native readonly int			PortalGroup;

Last edited by Xane123 on Wed Apr 25, 2018 1:21 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Please help! Errors only in modified source version!

Post by Graf Zahl »

The error probably lies elsewhere. Are you sure you are using a source revision that implements the stuff this is complaining about? To me it looks that it runs on a really outdated version of the parser being compiled into your EXE.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Please help! Errors only in modified source version!

Post by _mental_ »

Works fine for me. The only thing I needed to change is iwadinfo.txt, just re-added doom2.wad as IWAD.

Clean build should help you to get rid of these errors.
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

Re: Please help! Errors only in modified source version!

Post by Xane123 »

Graf Zahl wrote:Are you sure you are using a source revision that implements the stuff this is complaining about?
The first commit I updated the fork to was commit f4e139485a43e2a060d85883879eee2559493665, so the ZScript in the source should be what GZDoom's expecting. Just now I updated the fork to the latest commit, commit cf8ee3130b7e4476cc8683c92a64cad12425c571. It seems to be starting now, though.
_mental_ wrote:Clean build should help you to get rid of these errors.
I was doubting this but tried it anyway, deleting my build folder then allowing it to re-compile after merging the latest changes from coelckers/gzdoom strangely let the game start up as it should.

I feel a bit silly for this... :oops: Sorry for making a big deal about these errors but they were strange as I don't think I've seen errors from the ZScript code when I'd update the engine in the past, and them only showing up on my slightly-modified source code and not the "official" GZDoom was very strange; I guess if I'm in this confusing situation again, the best move is to pull/merge the latest engine changes then do a clean build. I'm still unsure about how it got the latest changes but didn't update the ZScript part of the source code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Please help! Errors only in modified source version!

Post by Graf Zahl »

I think your problem came somehow from lemon not recompiling the ZScript grammar. The error definitely looked like it tried to parse the files with an older set of rules.
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

Re: Please help! Errors only in modified source version!

Post by Xane123 »

So that's what "lemon" is! I've seen it but didn't know that's what it was responsible for... That explains why a clean build fixes it, because the old cached version doesn't exist so it re-builds the latest ZScript code.
Post Reply

Return to “General”