Skip to content

Commit

Permalink
nomination: remove unused variable
Browse files Browse the repository at this point in the history
add save check for rare cases
  • Loading branch information
Mistrick committed Apr 9, 2024
1 parent 7cc4944 commit 6f9b4fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cstrike/addons/amxmodx/scripting/map_manager_nomination.sma
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#endif

#define PLUGIN "Map Manager: Nomination"
#define VERSION "0.3.5"
#define VERSION "0.3.6"
#define AUTHOR "Mistrick"

#pragma semicolon 1
Expand Down Expand Up @@ -332,11 +332,10 @@ show_nomlist(id, Array: array, size)
new menu = menu_create(text, "nomlist_handler");
new map_info[MapStruct], item_name[MAPNAME_LENGTH + 16], map_index, nom_index, block_count;

for(new i, str_num[6]; i < size; i++) {
for(new i; i < size; i++) {
map_index = ArrayGetCell(array, i);
ArrayGetArray(g_aMapsList, map_index, map_info);

num_to_str(map_index, str_num, charsmax(str_num));
nom_index = map_nominated(map_info[Map]);
block_count = mapm_get_blocked_count(map_info[Map]);

Expand Down Expand Up @@ -398,6 +397,9 @@ public clcmd_mapslist(id)
if(is_one_map_mode()) {
return PLUGIN_HANDLED;
}
if(!is_user_connected(id)) {
return PLUGIN_HANDLED;
}

if(get_num(SHOW_LISTS) && mapm_advl_get_active_lists() > 1) {
show_lists_menu(id);
Expand Down

0 comments on commit 6f9b4fa

Please sign in to comment.