enhanced argc reporting

in a method argc out of bounds scenario, report how many it got, and what range it expected
This commit is contained in:
AzaezelX 2024-05-01 18:20:14 -05:00
parent 0f32ae256e
commit 1ea74bf8c6
2 changed files with 2 additions and 2 deletions

View file

@ -1173,7 +1173,7 @@ ConsoleValue Namespace::Entry::execute(S32 argc, ConsoleValue *argv, SimObject *
if ((mMinArgs && argc < mMinArgs) || (mMaxArgs && argc > mMaxArgs))
{
Con::warnf(ConsoleLogEntry::Script, "%s::%s - wrong number of arguments.", mNamespace->mName, mFunctionName);
Con::warnf(ConsoleLogEntry::Script, "%s::%s - wrong number of arguments. got %d, expected %d to %d", mNamespace->mName, mFunctionName, argc, mMinArgs, mMaxArgs);
Con::warnf(ConsoleLogEntry::Script, "usage: %s", mUsage);
return std::move(ConsoleValue());
}