Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 06:47, 25 October 2024 by PenguinEncounter (talk | contribs) (Created page with "{{lowercase}} {| class="wikitable" ! Arguments ! Returns |- | {{type|string...}} | {{Type|string}} |} Displays any amount of arguments without separators or the <code>[lua]</code> prefix. The return value is the displayed text without the formatting. If an argument is a {{type|string}}, it is interpreted as a [https://minecraft.wiki/w/Raw_JSON_text_format JSON text component], or if that fails, the string is displayed directly. All other types are displayed using [https...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Arguments Returns
string... string

Displays any amount of arguments without separators or the [lua] prefix. The return value is the displayed text without the formatting. If an argument is a string, it is interpreted as a JSON text component, or if that fails, the string is displayed directly. All other types are displayed using tostring.

Example

-- Displays "Hello, world!" in green
printJson [[{"text": "Hello, world!", "color": "green"}]]
-- Displays the name of the avatar in gold (example of dynamic text)
printJson(toJson {
    text = avatar:getName(),
    color = "gold"
})

See also