This originates from lua_baseentity.cpp: Line 3675 of getStatusEffect.Warning 1005: lua_call/lua_pcall called with too few arguments on the stack wrote: This warning indicates that the lua_call or lua_pcall Lua API function was called from C with fewer than the expected number of arguments on the Lua stack. These functions both expect there to be one plus the number of arguments the function accepts on the stack.
Further examination of the function shows that the followin segment of code is unnecesary:
Code: Select all
if( lua_pcall(L,2,1,0) )
{
return 0;
}
Since lua_pushnil is called if PStatusEffect is null, the only other suitable place for this would be in the else statment.
As the else statement adds a second parameter, this will qualify the lua_pcall.