[No] [ZScript] Additional warning message if no version

Moderator: Developers

[ZScript] Additional warning message if no version

Postby Matt » Wed Jun 13, 2018 3:23 pm

Right now if someone forgets the version number the only feedback happens when something post-2.3.0 is encountered and you get an error message saying "<class> not accessible to ZScript version 2.3.0".

This is obvious enough to anyone who's already familiar with ZS, but would be totally opaque to someone coming in from years of Decorate (and ACS) where this was never an issue.

Can we get something like the following, to be displayed in the console (preferably with increased visibility) if GZDoom notices there are classes defined before it encounters any version definition?

ZScript warning: <path/filename of zscript lump>: Class defined with no version number previously provided. Will fall back to version 2.3.0. (Latest version is ____)


This should give the current error messages a bit more context so people can help themselves, or at least have enough of a lead to where they should be looking in the wiki.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [ZScript] Additional warning message if no version

Postby Graf Zahl » Wed Jun 13, 2018 3:54 pm

Like I told you last time: ZScript without version info is legitimate version 2.3. This cannot be warned about without spamming valid content.
GLSL has the same issue, i.e. if you don't specify a version it assumes the very first, very limited one.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [ZScript] Additional warning message if no version

Postby Matt » Wed Jun 13, 2018 7:32 pm

Can we at least get something like this:

<class> not accessible to ZScript version 2.3.0. ZScript version must be specified for classes in later versions.


It's not inherently apparent to a newcomer that the ZScript version number should match the GZDoom version number, and simply looking at that one might think 2.3.0 was the newest version and either the feature or the syntax they were using was obsolete.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [ZScript] Additional warning message if no version

Postby Xaser » Thu Jun 14, 2018 12:07 am

A tweak on the above idea: since it's highly doubtful anyone's writing any new ZScript code that specifically targets 2.3.0 ('cause it's old), the only time people are going to run into this exact error message, practically speaking, is because they forgot to put a declaration. So perhaps only if the assumed ZScript version is exactly 2.3.0, amend the message to read something like:

<class> not accessible to ZScript version 2.3.0. Did you remember to declare a version number in your ZScript code?


This patches the hole without impacting any actual mods built for 2.3.0.

[Wording suggestions welcome, of course.]
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [ZScript] Additional warning message if no version

Postby Cacodemon345 » Thu Jun 14, 2018 12:27 am

I second Xaser here.
Cacodemon345
 
Joined: 22 Dec 2017
Discord: Cacodemon345#9151


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests