G.assert
From GMod Wiki
| Function | |
| Syntax | assert( Boolean  condition, String  message ) Where is this used? | 
| Description: | |
| Evaluates the condition, and errors with the string if it returns false. | |
| Returns: | String | 
| Part of Library: | Global Functions | 
| Realm: |  | 
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.assert]G.assert [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] | 
	
Example
| Description | Errors if file.txt is blank. | 
|---|---|
| Used on |  | 
| Code | assert(file.Read("file.txt"), "Oops.") | 
| Output | N/A | 
 
			
			