Skip to content

Commit

Permalink
Try to support functions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Apr 5, 2024
1 parent 9211a89 commit 3931489
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/library_Global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,15 @@ LUA_FUNCTION(Global_Msg)
} else {
int type = LUA->GetType(i);
bool meta = false;
void* ref = nullptr;
switch(type)
{
case GarrysMod::Lua::Type::Bool:
ss << (LUA->GetBool(i) ? "true" : "false");
break;
case GarrysMod::Lua::Type::Function:
ss << "function: 0x" << std::hex << LUA->GetUserdata(i);
break;
default:
LUA->Push(i);
if (LUA->GetMetaTable(-1))
Expand Down

0 comments on commit 3931489

Please sign in to comment.