How to use @param and others?

Hello developers,

I want to make my custom tips for functions,
but I can’t know how to use it.

I tried the code like:

-- The function for the test
--[=[
    @param something any -- something
    @return void
]=]
local function test(something)
	print(something)
end

But it seems not working; it just shows:

@param something any -- something
@return void

Correct me if I understand it as wrong way.

Any helps would be appreciated!

2 Likes

Aren’t you using it ?

attribute param doesn’t exist (native is only, native code generation) as far as i know

But I heard that it is exist; I saw a post.

This is intended to happen, it shows a documentation comment over the function, with roblox’s studio text-editor, these don’t have color which is why you often wont see roblox studio developers use documentation comments but Rojo developers will. Heres an example of that highlighting and code block using my signalqueue queuesignal method



as you can see from both images it separate the ocmment at the top and puts the params and return at the bottom! very cool! The issue your facing is a roblox text editor issue, a reason why i switched to vsc a long time ago for roblox

2 Likes

So, that means I can’t use it with Roblox Text Editor?

there are some markup tags you can use to make it manually, but they are undocumented

I saw this post trying to find them

People had made plugins for that like:

There is other plugins like that but this is the most popular.

I still don’t see any reason as to why would you need that.
Just write smth like --[[This function returns a cool number]]+typecheck and its already very readable.

But, does it work to people who doesn’t have that plugin? I want to make my script to be usable to others.

No it wont.
How could it work for people who do not have a plugin?
Just use --[[]] ontop of a function (without spacing) and it will put it as a function description.

But I can’t use that in module; I’ll give you new post.