Skip to content

Conversation

@Fernando-A-Rocha
Copy link
Contributor

@Fernando-A-Rocha Fernando-A-Rocha commented Nov 12, 2024

Fixes #3852
Caused by: #3853 (comment)

I found that 2 missing includes were preventing the script from checking if a server's version is too low to start a certain resource that requires a higher version.

image

image

@PlatinMTA
Copy link
Contributor

PlatinMTA commented Nov 12, 2024

Can we just send a warning instead of not letting the resource start since its serversided?

(edit: nvm its checked in the same if statement)

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Nov 12, 2024

If a dev defines a certain min server version in the meta.xml, their intention is to prevent a server with an inferior server from starting the resource.

If the server owner wants to go crazy and execute the resource anyway, then they can easily edit meta.xml to get rid of the min_mta_version setting.

@TracerDS
Copy link
Contributor

How does including 2 headers fix this issue?

@Fernando-A-Rocha
Copy link
Contributor Author

How does including 2 headers fix this issue?

  • MTASA_VERSION_BUILD was not defined without version.h (see the code on the screenshot in the main post)
  • CStaticFunctionDefinitions was also not imported

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Nov 13, 2024

After some digging, I found that this commit actually broke it
693976b ("Clean up precompiled headers for Server" with 435 files changed)
@botder removed CStaticFunctionDefinitions.h and version.h includes from Server/mods/deathmatch/StdInc.h

Copy link
Member

@Nico8340 Nico8340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@TheNormalnij TheNormalnij merged commit 8c0a01b into multitheftauto:master Nov 14, 2024
6 checks passed
@TheNormalnij
Copy link
Member

thx

MTABot pushed a commit that referenced this pull request Nov 14, 2024
8c0a01b Fix min_mta_version 'server' not working as expected (#3853)
8bf0698 Visual Studio Update
@Fernando-A-Rocha Fernando-A-Rocha deleted the minversion-server branch November 14, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

min_mta_version 'server' is not working as expected

5 participants