error

From Garry's Mod
Revision as of 15:35, 10 November 2016 by EstevanTH (Talk | contribs)
Jump to: navigation, search
 error( )

Contents

Description

Throws a Lua error and breaks out of the current call stack.

NOTE

Bug: In a few situations, the message needs to be prefixed with "[]#", where brackets can contain something and # can be replaced by any character.

Arguments

string message

The error message to throw.

Arguments

number errorLevel=1

The level to throw the error at.

Examples

Example

error("garry")

Output:

[ERROR] lua_run:1: garry
Personal tools
Navigation