Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ include(AddSAMPPlugin)

add_subdirectory(lib/omp-sdk)

set(CMAKE_CXX_STANDARD 20)

add_samp_plugin(${PROJECT_NAME}
plugin.def

Expand Down
4 changes: 4 additions & 0 deletions src/script.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ 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"};
Comment thread
Zorono marked this conversation as resolved.
}

const auto &command = cmds_.at(name);

if (strict && command->IsAlias()) {
Expand Down