Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix min_mta_version 'server' not working as expected #3853

Merged

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
Contributor

@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

@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