From a87ae8356ff9293d49d1d5557565980b6b1e6f8f Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sun, 15 Jun 2025 13:22:29 +0300 Subject: [PATCH 1/3] Update script.cc possible fix for `[Info] [Pawn.CMD] PC_RegAlias: _Map_base::at` --- src/script.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script.cc b/src/script.cc index c0eb710..2153add 100644 --- a/src/script.cc +++ b/src/script.cc @@ -226,6 +226,9 @@ void Script::NewCommand(const std::string &name, const PublicPtr &pub, } const CommandPtr &Script::GetCommand(const std::string &name, bool strict) { + if(!cmds_.contains(name)) + throw std::runtime_error{"Command '" + name + "' doesn't exist"}; + const auto &command = cmds_.at(name); if (strict && command->IsAlias()) { From e2dc404da5e1f2447e41c846f8cffbc9c73fbc7e Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sun, 15 Jun 2025 13:40:41 +0300 Subject: [PATCH 2/3] Add support for C++ 20 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1daecac..b5eebbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ include(AddSAMPPlugin) add_subdirectory(lib/omp-sdk) +set(CMAKE_CXX_STANDARD 20) + add_samp_plugin(${PROJECT_NAME} plugin.def From 4ac1c8290f8e980dc71520c6c33bcb20e0da2cf9 Mon Sep 17 00:00:00 2001 From: John Magdy Lotfy Kamel <19735243+Zorono@users.noreply.github.com> Date: Sun, 15 Jun 2025 18:47:19 +0300 Subject: [PATCH 3/3] Update script.cc --- src/script.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/script.cc b/src/script.cc index 2153add..c5049a0 100644 --- a/src/script.cc +++ b/src/script.cc @@ -226,8 +226,9 @@ void Script::NewCommand(const std::string &name, const PublicPtr &pub, } const CommandPtr &Script::GetCommand(const std::string &name, bool strict) { - if(!cmds_.contains(name)) + if(!cmds_.contains(name)) { throw std::runtime_error{"Command '" + name + "' doesn't exist"}; + } const auto &command = cmds_.at(name);