Difference between revisions of "Message"
Jump to navigation
Jump to search
formatting
imported>DragoonWraith m (→Displaying Variables: fixing link) |
imported>Quetzilla (formatting) |
||
Line 1: | Line 1: | ||
__NOTOC__ | |||
== Description == | == Description == | ||
'''Syntax:''' | '''Syntax:''' | ||
Message "Message text", [var1], [var2], DisplaySeconds | Message "Message text", [var1], [var2], DisplaySeconds | ||
Line 10: | Line 10: | ||
Displays a message on the screen. | Displays a message on the screen. | ||
The DisplaySeconds parameter is supposed to set how long the message will be displayed for, and it must be an integer (or else the script will fail to compile, stating that it must be in integer), however testing seems to indicate that the parameter has absolutely no effect whatsoever on how long the message is actually displayed. If you have successfully set a message to display for longer or shorter than the default time, please mention it in the [[Talk:Message|talk]] page! | ==Notes== | ||
*The DisplaySeconds parameter is supposed to set how long the message will be displayed for, and it must be an integer (or else the script will fail to compile, stating that it must be in integer), however testing seems to indicate that the parameter has absolutely no effect whatsoever on how long the message is actually displayed. If you have successfully set a message to display for longer or shorter than the default time, please mention it in the [[Talk:Message|talk]] page! | |||
Up to 9 variable names can also be passed into the Message. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed. | *Up to 9 variable names can also be passed into the Message. These are displayed in the order they are used as parameters. The message must specify how the variable is to be displayed. | ||
== Displaying Variables == | == Displaying Variables == | ||
{{MessageFormatting}} | {{MessageFormatting}} | ||
===Examples=== | ===Examples=== | ||
Message "Var1:% 5.2f / Var2:% 5.2f" Var1 Var2 | Message "Var1:% 5.2f / Var2:% 5.2f" Var1 Var2 | ||
'''"Var1: 123.45 / Var2: -123.45"''' | Displays: '''"Var1: 123.45 / Var2: -123.45"''' | ||
Message "Var1:%05.2f / Var2:%05.2f" Var1 Var2 | Message "Var1:%05.2f / Var2:%05.2f" Var1 Var2 | ||
'''"Var1: 00123.45 / Var2:-00123.45"''' | Displays: '''"Var1: 00123.45 / Var2:-00123.45"''' | ||
Message "Var1:%+-5.0f / Var2:%+-5.0f" Var1 Var2 | Message "Var1:%+-5.0f / Var2:%+-5.0f" Var1 Var2 | ||
'''"Var1:+123 / Var2:-123 "''' | Displays: '''"Var1:+123 / Var2:-123 "''' | ||
Message "Var1:% .3e / Var2:% .3e" Var1 Var2 | Message "Var1:% .3e / Var2:% .3e" Var1 Var2 | ||
'''"Var1: 1.234E+2 / Var2:-1.234E+2"''' | Displays: '''"Var1: 1.234E+2 / Var2:-1.234E+2"''' | ||
==See Also== | ==See Also== | ||
* [[MessageEx]] | |||
* [[MessageBox]] | * [[MessageBox]] | ||
* [[ | * [[PrintToConsole]] | ||
[[Category: Functions]] | [[Category: Functions]] |