Skip to content

Commit 7043da3

Browse files
authored
changed readme
1 parent 1ee0d5a commit 7043da3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
### Functions
88

9-
- `void check(string patern)`
10-
Check function arguments by pattern. It causes an error "bad argument" if the check failed.
9+
- `boolean check(string patern)`
10+
Check function arguments by pattern. It causes an error "bad argument" if the check failed, otherwise returns 'true'.
1111

1212
- `boolean scheck(string pattern)`
1313
Soft check function arguments by pattern. It causes a warning "bad argument" and returns 'false' if the check failed, otherwise returns 'true'.
@@ -188,7 +188,7 @@ function test()
188188
checkers.percent = function(v) return type(v) == "number" and v >= 0 and v <= 1 end
189189
iprint(f(0.1)) -- true
190190
iprint(f(1)) -- true
191-
iprint(f(1.1)) -- error: bad argument #3 'num' to 'f' (percent expected, got number)
191+
iprint(f(1.1)) -- error: bad argument #1 'num' to 'f' (percent expected, got number)
192192
end
193193
```
194194

0 commit comments

Comments
 (0)