print displays nothing. It appends a value to the processor’s text buffer — a string that
piles up inside and is visible to nobody until it is handed out.
printflush hands it out — to a message block; or draw print
together with drawflush — to a display.
Because of that, text in mlog is assembled piece by piece: the label separately, the number separately, the separator separately. The language has no string concatenation at all, and it does not need one: the buffer is the concatenation.
Lessons
Section titled “Lessons”- The text bufferThe string is assembled piece by piece and sits inside the processor until it is handed out
- What prints as whatAnything can be printed — and almost everything turns into text differently from what you expect
What you need first
Section titled “What you need first”«Number, object and text» — that a string is an object, not a number. The lesson will tell you the rest itself.
Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.