| 8328 | //========================================================================== |
| 8329 | |
| 8330 | bool CheckArgSize(FName fname, FArgumentList &args, int min, int max, FScriptPosition &sc) |
| 8331 | { |
| 8332 | int s = args.Size(); |
| 8333 | if (s < min) |
| 8334 | { |
| 8335 | sc.Message(MSG_ERROR, "Insufficient arguments in call to %s, expected %d, got %d", fname.GetChars(), min, s); |
| 8336 | return false; |
| 8337 | } |
| 8338 | else if (s > max && max >= 0) |
| 8339 | { |
| 8340 | sc.Message(MSG_ERROR, "Too many arguments in call to %s, expected %d, got %d", fname.GetChars(), min, s); |
| 8341 | return false; |
| 8342 | } |
| 8343 | return true; |
| 8344 | } |
| 8345 | |
| 8346 | //========================================================================== |
| 8347 | // |
no test coverage detected