mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-08-17 00:36:55 +00:00
Fix error messages on sendnotification
This commit is contained in:
parent
3ade7f5743
commit
f039f57f11
@ -217,11 +217,11 @@ std::pair<bool, std::string> LuaAPI::MP::SendNotification(int ID, const std::str
|
|||||||
auto c = MaybeClient.value().lock();
|
auto c = MaybeClient.value().lock();
|
||||||
if (!c->IsSynced()) {
|
if (!c->IsSynced()) {
|
||||||
Result.first = false;
|
Result.first = false;
|
||||||
Result.second = "Player still syncing data";
|
Result.second = "Player is not synced yet";
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
if (!Engine->Network().Respond(*c, StringToVector(Packet), true)) {
|
if (!Engine->Network().Respond(*c, StringToVector(Packet), true)) {
|
||||||
beammp_errorf("Failed to send notification back to sender (id {}) - did the sender disconnect?", ID);
|
beammp_errorf("Failed to send notification to player (id {}) - did the player disconnect?", ID);
|
||||||
Result.first = false;
|
Result.first = false;
|
||||||
Result.second = "Failed to send packet";
|
Result.second = "Failed to send packet";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user