How to subtract 2 variable?

{{ $maxstar := 5 }}
{{ $fillstar := .Get 0 }}
{{ $emptystar := sub $maxstar $fillstar }}
{{ range (seq $fillstar) }}
fill 
{{ end }}
{{ range (seq $emptystar) }}
empty 
{{ end }}

I got an error where i declare variable empty star

This look like from a shortcode. Can you show us how you call the shortcode form your .md.

What kind of error, can you copy/paste it.

Thanks.

yes it’s from shortcode the param is a string so it can’t execute the operation so I just need to convert it to string

You have to show the code so we understand what is happening. Always share the error you get when seeking help.

Read Requesting Help and share more information about your issue.

ok thanks!