MCPcopy Create free account
hub / github.com/ZDoom/Raze / CheckArgSize

Function CheckArgSize

source/common/scripting/backend/codegen.cpp:8330–8344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8328//==========================================================================
8329
8330bool 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//

Callers 2

ResolveMethod · 0.85

Calls 3

MessageMethod · 0.80
SizeMethod · 0.45
GetCharsMethod · 0.45

Tested by

no test coverage detected