It doesn't work because you don't have "Use tooltips for inline rolls" checked in preferences.
I would also write the same code as this:
Code: Select all
[H: abort(input("number|1|Number of d6's|TEXT"))]
[H: result = roll(number,6)]
[R,G: strformat("I roll %{number}d6's! The total is <span style='color:red;font-weight:bold'>%{result}</span>!")]
First line I recommend using an input to get values from the user. First it's more descriptive and it also allows you to stop without an error message. Leaving an unexpressed variable is just an MT thing and is a bad habit to start in programming.
Second line. Using x is fine but it's recommended to use variable names that are more descriptive. It's a good habit to get in to especially when your coding becomes more complex and longer.
Third line. Use R with G to suppress the tooltip. In this case showing how the output is concatenated isn't really helpful. Also,
Wiki: strformat() is much more friendly and easier to see what's in your output than trying to concatenate with +'s. I used <span style> instead of font in this case because MT ignores the <font> tag for color sometimes and style is more reliable.