Are you sure you want to report this?

A feedback area designed for scripting and mods suggestions and feedback. Please note bug reports and support issues will be removed.


Function Parameters, Output and more.


Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 2
    Comment actions Permalink

    The post is 1 year old and only few people voted, this should be implemented it's very useful. I agree with you

  • 0
    Comment actions Permalink

    You could just use scoreboard values and then execute the function.

  • 1
    Splox Fox commented
    Comment actions Permalink

    I think that the parameters should be headed at the top of the mcfunction like this with some character like $ starting the line to differentiate them from commands:

    $exampleA, exampleB

    And then after this, parameter names can be accessed like so in commands:

    say $exampleA$exampleB

    Then the game replaces all instances of $exampleA with whatever you passed in while calling the function:

    function myexample:function foo bar

    (says foobar)

    Obviously, this is a contrived example (you could use tellraw here), but in many cases this would be amazing to have.