From 0f5cf26270ed82fc49b68caf807a53cf0528bff4 Mon Sep 17 00:00:00 2001 From: KaidoRen Date: Wed, 15 May 2019 08:19:54 +0500 Subject: [PATCH] Revert "Creating a variable inside an if statement (C++17)" This reverts commit b2c1e7c77576c02a00c8c3f103457000d3298ceb. --- amxmodx/srvcmd.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 183dfda0..01c629c5 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -72,8 +72,9 @@ void amx_command() else { auto id = atoi(CMD_ARGV(2)); - - if (auto plugin = g_plugins.findPlugin(id); plugin && plugin->isValid()) + auto plugin = g_plugins.findPlugin(id); + + if (plugin && plugin->isValid()) { print_srvconsole(" Name: %s\n", plugin->getTitle()); print_srvconsole(" Version: %s\n", plugin->getVersion());