diff --git a/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp b/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp index c02bf565..c5954c4c 100644 --- a/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp +++ b/dScripts/ai/ACT/FootRace/BaseFootRaceManager.cpp @@ -12,7 +12,10 @@ void BaseFootRaceManager::OnFireEventServerSide(Entity* self, Entity* sender, st if (splitArguments.size() > 1) { const auto eventName = splitArguments[0]; - const auto player = Game::entityManager->GetEntity(std::stoull(splitArguments[1])); + auto playerId = GeneralUtils::TryParse(splitArguments[1]); + if (!playerId) return; + + const auto player = Game::entityManager->GetEntity(playerId.value()); if (player != nullptr) { if (eventName == "updatePlayer") {