G.MsgN
From GMod Wiki
Revision as of 16:26, 11 October 2010 by DarKSunrise (Talk | contribs)
Function | |
Syntax |
MsgN( String message ) Where is this used? |
Description: | |
This function prints text in the console and automatically appends "\n" to the message. | |
Returns: | nil |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.MsgN]G.MsgN [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Outputs "Hello World" to console. |
---|---|
Used on | |
Code | MsgN( "Hello World" ) |
Output | Hello World |
Description | Outputs the contents of the variable "MyString" to console. |
---|---|
Used on | |
Code | local MyString = "pie" MsgN( "This is my string: " .. MyString) |
Output | pie |
Additional Notes
- This is essentially the same as Msg except that it adds "\n" to the end for you.
- If run on the client, the message will be yellow in color. When run on the server, the message will be blue in color. For white text, use print.
- This is only visible in the console of the system it is run on - when run on the server, only the server console sees it. When run on the client, only that client sees it. If you wish to send a message to all clients, consider using MsgAll.