Changed CheckEnum to use lua_isnoneornil so that enum args can be made properly optional. Changed PlayMusicPart to allow nil for optional args so optional args would be independent.
This commit is contained in:
+1
-3
@@ -6,9 +6,7 @@
|
||||
|
||||
int CheckEnum( lua_State *L, LuaReference &table, int iPos, int iInvalid, const char *szType, bool bAllowInvalid, bool bAllowAnything )
|
||||
{
|
||||
luaL_checkany( L, iPos );
|
||||
|
||||
if( lua_isnil(L, iPos) )
|
||||
if( lua_isnoneornil(L, iPos) )
|
||||
{
|
||||
if( bAllowInvalid )
|
||||
return iInvalid;
|
||||
|
||||
Reference in New Issue
Block a user