mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-13 15:28:04 +03:00
Creating a variable inside an if statement (C++17)
This commit is contained in:
parent
5f66e7f190
commit
b2c1e7c775
@ -72,9 +72,8 @@ void amx_command()
|
||||
else
|
||||
{
|
||||
auto id = atoi(CMD_ARGV(2));
|
||||
auto plugin = g_plugins.findPlugin(id);
|
||||
|
||||
if (plugin && plugin->isValid())
|
||||
|
||||
if (auto plugin = g_plugins.findPlugin(id); plugin && plugin->isValid())
|
||||
{
|
||||
print_srvconsole(" Name: %s\n", plugin->getTitle());
|
||||
print_srvconsole(" Version: %s\n", plugin->getVersion());
|
||||
|
Loading…
x
Reference in New Issue
Block a user