diff --git a/docs/stdlib.md b/docs/stdlib.md index 4007c9c..38624ee 100644 --- a/docs/stdlib.md +++ b/docs/stdlib.md @@ -14,7 +14,7 @@ Includes misc. functions. The "junk drawer" of the standard library. Without the | tostring | `()` -> `` | Converts the datatype to a ``, if a `` is passed `__tostring` metamethod is invoked | `tostring(12)` -> `"12"` | | error | `()` | Throws an error with the passed `` | `error("error!")` | | pcall | `()` -> `, or ` | Tries a protected call on the passed function, if an error is thrown, `` will be false and the 2nd result will be the error message | `pcall(error("Hello world!"))` -> `false, "Hello world!"` | -| assert | `()` | If the passed `` is false, an error is thrown | `assert(1 == 1)` | +| assert | `(, )` | If the passed `` is false, an error is thrown, optionally uses custom error message | `assert(1 == 1, "Error Message!")` | | loadstring | `()` -> `, or ` | If the `` compiled successfully, 1st result will be true and the 2nd result will be the newly compiled function. If there was a compiler/lexer error, the 1st result will be false and the 2nd result will be the error | `loadstring("print(\"hi\")")()` | > -> means 'returns'