GameMaker Does @func @function actually work?

samspade

Member
Title says it. Does the @func or @function JSDoc Script Comments actually do anything?

I've tried both versions with and without spaces, cleaned my build, saved, and restarted, checked preferences (couldn't find any relating to it) and it seems to have no effect. GMS 2 autocompletes my script with arguments regardless of whether I use it, and using it doesn't let me change how it autocompletes (e.g. it only autocompletes by the script name in the resource tree).

Similar issue brought up before.
https://forum.yoyogames.com/index.php?threads/what-does-func-actually-do.67786/#post-403620
 
It doesn't change the way it autocompletes the scripts name. It allows you to use @param which then shows the parameter names as you fill them in. (Bottom bar of code editor).
Code:
///@function foo(a, b);
///@param a
///@param b
EDIT: It appears I misunderstood your question. @YellowAfterlife has a better grasp. Also, I learned something new.
 

NightFrost

Member
I've also noticed if you give parameters different names between @function and @param lines, GMS uses those defined on @param. I recall the @function defines number of parameters, so if you have more @param lines than entries in @function, the extra ones are not shown in the function help. In other words
Code:
///@function foo(a, b);
///@param aaa
///@param bbb
// --> Help line says foo(aaa, bbb)
Code:
///@function foo(a, b);
///@param a
///@param b
///@param c
// --> Help line says foo(a, b)
 
Top