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 "or_greater"/"or_less" code example #10075

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

KleidonBD
Copy link
Contributor

The code example demonstrating the usage of the "or_greater" and "or_less" hints for the export_range annotation does not declare a variable after the annotation, which is inconsistent with the previous three code examples in the section. It should be declared as "var l" to follow the established pattern.

Also, giving the export_range a step of 1 does not create a slider for the property in the editor, like the text suggests, but it instead creates a spin box. The step should be changed to a float so the property can appear as a slider, as can be seen below.

export_range

The code example demonstrating the usage of the "or_greater" and "or_less" hints for the export_range annotation does not declare a variable after the annotation, which is inconsistent with the previous three code examples in the section.
Also, giving the export_range a step of 1 does not create a slider for the property in the editor, like the text suggests, but it instead creates a spin box. The step should be changed to a float so the property can appear as a slider.
Copy link
Contributor

@tetrapod00 tetrapod00 left a comment

Choose a reason for hiding this comment

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

Tested and the new example works. The old example indeed did not compile.

@mhilbrunner mhilbrunner added bug topic:gdscript area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.3 labels Nov 5, 2024
@mhilbrunner mhilbrunner merged commit eee29a2 into godotengine:master Nov 5, 2024
1 check passed
@mhilbrunner
Copy link
Member

Thank you! Merged.

@mhilbrunner
Copy link
Member

Cherrypicked to 4.3 in #10346.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants