G.ErrorNoHalt
From GMod Wiki
Function | |
Syntax |
ErrorNoHalt( String message ) Where is this used? |
Description: | |
Similiar to Error, this function will print an error without halting the script. The color of the text is dependant on whether it is run on the client or server. | |
Returns: | nil |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.ErrorNoHalt]G.ErrorNoHalt [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Outputs Error to console. |
---|---|
Used on | |
Code | ErrorNoHalt("MyScript: Failed to load necessary resources!\n") |
Output | Yellow text in the console of the client this runs on. |
Description | Outputs Error to console. |
---|---|
Used on | |
Code | ErrorNoHalt("MyScript: Failed initilization!\n") |
Output | Blue text in the console of the server. |
Additional Notes
- Just like the Error function, you need to end your error message with "\n" so the next message in the console isn't placed at the end of your message.
- If run on the client, the message will be yellow in color. When run on the server, the error will be blue in color.
- The error text will also be shown on the User's HUD on the right side of his screen, just like any other Lua error message. Note that this is an unprofessional way to display information to the player and should only be used for debugging purposes.