Skip to content

Commit 6f9b4fa

Browse files
committed
nomination: remove unused variable
add save check for rare cases
1 parent 7cc4944 commit 6f9b4fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cstrike/addons/amxmodx/scripting/map_manager_nomination.sma

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
#define PLUGIN "Map Manager: Nomination"
12-
#define VERSION "0.3.5"
12+
#define VERSION "0.3.6"
1313
#define AUTHOR "Mistrick"
1414

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

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

339-
num_to_str(map_index, str_num, charsmax(str_num));
340339
nom_index = map_nominated(map_info[Map]);
341340
block_count = mapm_get_blocked_count(map_info[Map]);
342341

@@ -398,6 +397,9 @@ public clcmd_mapslist(id)
398397
if(is_one_map_mode()) {
399398
return PLUGIN_HANDLED;
400399
}
400+
if(!is_user_connected(id)) {
401+
return PLUGIN_HANDLED;
402+
}
401403

402404
if(get_num(SHOW_LISTS) && mapm_advl_get_active_lists() > 1) {
403405
show_lists_menu(id);

0 commit comments

Comments
 (0)