mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
fix luatable in GetPlayerIdentifiers
This commit is contained in:
parent
261aa8f320
commit
7a3848e640
@ -353,12 +353,13 @@ int lua_GetIdentifiers(lua_State* L) {
|
|||||||
auto IDs = MaybeClient.value().lock()->GetIdentifiers();
|
auto IDs = MaybeClient.value().lock()->GetIdentifiers();
|
||||||
if (IDs.empty())
|
if (IDs.empty())
|
||||||
return 0;
|
return 0;
|
||||||
lua_newtable(L);
|
LuaTable::Begin(L);
|
||||||
for (const std::string& ID : IDs) {
|
for (const std::string& ID : IDs) {
|
||||||
lua_pushstring(L, ID.substr(0, ID.find(':')).c_str());
|
LuaTable::BeginEntry(L, ID.substr(0, ID.find(':')).c_str());
|
||||||
lua_pushstring(L, ID.c_str());
|
lua_pushstring(L, ID.c_str());
|
||||||
lua_settable(L, -3);
|
LuaTable::EndEntry(L);
|
||||||
}
|
}
|
||||||
|
// LuaTable::End(L, "");
|
||||||
} else
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user