Skip to content

Commit

Permalink
Replaced it with LUA->TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Apr 5, 2024
1 parent be937cc commit 0657e88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/class_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool IsFile(GarrysMod::Lua::ILuaBase* LUA, int index)
void File_CheckType(GarrysMod::Lua::ILuaBase* LUA, int index)
{
if(!LUA->IsType(index, GarrysMod::Lua::Type::UserData)) // ToDo: Make a better check.
luaL_typerror(LUA->GetState(), index, metaname);
LUA->TypeError(index, metaname);
}

LUA_File* File_GetUserdata(GarrysMod::Lua::ILuaBase *LUA, int index)
Expand Down
2 changes: 1 addition & 1 deletion source/class_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void Push_Vector(GarrysMod::Lua::ILuaBase* LUA, Vector vec)
void Vector_CheckType(GarrysMod::Lua::ILuaBase* LUA, int index)
{
if(!LUA->IsType(index, GarrysMod::Lua::Type::UserData))
luaL_typerror(LUA->GetState(), index, metaname);
LUA->TypeError(index, metaname);
}

bool IsVector(GarrysMod::Lua::ILuaBase* LUA, int index)
Expand Down

0 comments on commit 0657e88

Please sign in to comment.