mojira.dev
MC-264999

Macro entries cannot include "$(" as a literal

The bug

Macro entries, which start with $ in an mcfunction file, cannot include $( as a literal because they are attempted to be parsed as parameters, not as literal segments.

Workaround

You can workaround this by instantiating a macro with the argument $(.

macro.mcfunction

$say $(a)

When you run the following command,

function macro {a: "$("}

$say $(a) will become say $( after instantiation.

Linked issues

Comments 2

This is more suggesting the addition of an escaping method than an actual bug. This report can literally be written as "syntax reader does not read syntax indicator as not a syntax indicator" which, as you may guess, is not a mistake. :/

This is a feature request

intsuc

(Unassigned)

Confirmed

(Unassigned)

23w33a

Retrieved