G.Error

From GMod Wiki

Jump to: navigation, search
Function
Syntax Error( String message )
Where is this used?
Description:
Similar to the Msg function, this function prints text in the console. The color of the text is dependant on whether it is run on the client or server. This function will stop all functions in the call stack when it is called.
Returns: nil
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.Error]G.Error [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionOutputs Error to console.
Used onNewerClient.png
Code
Error("MyScript: Failed to load necessary resources!\n")
OutputYellow text in the console of the client this runs on.


DescriptionOutputs Error to console.
Used onNewerServer.png
Code
Error("MyScript: Failed initialization!\n")
OutputBlue text in the console of the server.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox