Garry's Mod Wiki

ErrorNoHalt

void ErrorNoHalt( vararg arguments )

Description

Throws a Lua error but does not break out of the current call stack. This function will not print a stack trace like a normal error would. Essentially similar if not equivalent to Msg.

Using this function in the menu state exits the menu.

Arguments

1 vararg arguments
Converts all arguments to strings and prints them with no spacing.

Example

An example of the use of this function

local num = 11 if ( num <= 10 and num >= 0 ) then print( "The number is", num ) else ErrorNoHalt( "Number out of range!\n" ) print("This line will be printed") end
Output: Number out of range!
This line will be printed

Page Links


Special Pages


Wikis

?

Render Time: 21ms

Session 0
DB GetPage 3
Generate Html 1
SaveChanges 8
Render Body 0
Render Sidebar 7