godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

missing @ hint on export (typo?)

Open aseiis opened this issue 3 years ago • 6 comments

Updating to GDScript 2.0 syntax

aseiis avatar Jul 19 '22 16:07 aseiis

It would be good to do a pass on the docs and update all cases where annotations should be used now, or at least do it in bulk.

YuriSizov avatar Jul 19 '22 16:07 YuriSizov

This is not a typo – it's outdated Godot 3.x code. @export is an annotation in 4.0, while it was a keyword in 3.x.

That said, I would recommend anyone doing a PR on master to change all occurrences of export annotations in the entire docs site.

Calinou avatar Jul 19 '22 16:07 Calinou

I thought it was a typo because further in the tutorial it has been updated to GDScript 2. It was my first PR on Godot project, thats why I didn't make anything big. I'll try to change more then

aseiis avatar Jul 19 '22 17:07 aseiis

For this particular tutorial I think everything's fine, I just modified yield into await in the last commit

aseiis avatar Jul 19 '22 17:07 aseiis

I thought it was a typo because further in the tutorial it has been updated to GDScript 2.

Well, that's why it would be nice to do a proper pass 🙃 As you can see, if someone changes only some of the outdated syntax, it gets confusing and harder to track afterwards. If you want to take time and look through other related articles, that would be amazing and a great way to contribute!

YuriSizov avatar Jul 19 '22 18:07 YuriSizov

Without being a complete beginner, my knowledge of GDScript is not enough to be able to check pages and be sure I am not leaving anything out. I may come back later when I feel more comfortable but I guess we can already accept these two small commits

aseiis avatar Jul 19 '22 21:07 aseiis

Thank you! Sorry this took a bit to get merged :)

mhilbrunner avatar Aug 26 '22 12:08 mhilbrunner