I was having trouble figuring out why some of my code wasn't executing properly for a bit when I came to realize, "Oh! I didn't have version "x" specified!"
I thought I had done it but apparently not. It would be appreciated if the engine says something like "Version must be specified" or something.
Error for no ZScript version
Moderator: GZDoom Developers
-
- Posts: 8197
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Error for no ZScript version
But version does not need to be specified.
The very first version did not have this.
The very first version did not have this.
-
- Posts: 8197
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Error for no ZScript version
Attached is a file that errors out if you don't have version specified because of... reasons. If you uncomment the very first line, it actually loads.
You do not have the required permissions to view the files attached to this post.
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Error for no ZScript version
Without a version directive it will be compiled as version 2.3. The directive was only introduced with version 2.4.
-
- Posts: 13834
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Error for no ZScript version
This is one of those "shoulda coulda woulda" things but this would break too many mods if there was such an error.
This is why defcvars was introduced with a version requirement right out the gate, to avoid that shoulda-coulda-woulda problem. Makes it more future proof by requiring that the version always be specified - that way if I need to introduce any breaking changes to the system I can keep a compatibility parser for older versions and not have to worry about the new parser fritzing out on it.
This is why defcvars was introduced with a version requirement right out the gate, to avoid that shoulda-coulda-woulda problem. Makes it more future proof by requiring that the version always be specified - that way if I need to introduce any breaking changes to the system I can keep a compatibility parser for older versions and not have to worry about the new parser fritzing out on it.