Garry's Mod Wiki

Garry's Mod Wiki

  string RunString( string code, string identifier = "RunString", boolean handleError = true )


Evaluates and executes the given code, will throw an error on failure.

Local variables are not passed to the given code.


1 string code
The code to execute.
2 string identifier = "RunString"
The name that should appear in any error messages caused by this code.
3 boolean handleError = true
If false, this function will return a string containing any error messages instead of throwing an error.


1 string
If handleError is false, the error message (if any).


Compiles and runs print("test").

Output: test

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...