@@ -158,7 +158,7 @@ public native_load_maplist_to_array(plugin, params)
158158 new filename[256 ];
159159 get_string (arg_filename, filename, charsmax (filename));
160160
161- load_maplist (Array: get_param (arg_array), filename, false );
161+ return load_maplist (Array: get_param (arg_array), filename, true );
162162}
163163public native_get_map_index (plugin, params)
164164{
@@ -288,7 +288,7 @@ load_maplist(Array:array, const file[], bool:silent = false)
288288 new error[192 ]; formatex (error, charsmax (error), " File doesn't exist ^" % s^ " ." , file_path);
289289 set_fail_state (error);
290290 }
291- return ;
291+ return 0 ;
292292 }
293293
294294 new f = fopen (file_path, " rt" );
@@ -297,7 +297,7 @@ load_maplist(Array:array, const file[], bool:silent = false)
297297 if (! silent) {
298298 set_fail_state (" Can't read maps file." );
299299 }
300- return ;
300+ return 0 ;
301301 }
302302
303303 new map_info[MapStruct], text[48 ], map[MAPNAME_LENGTH], first_map[MAPNAME_LENGTH], min[3 ], max[3 ], bool: nextmap, bool: found_nextmap;
@@ -330,9 +330,12 @@ load_maplist(Array:array, const file[], bool:silent = false)
330330 }
331331 fclose (f);
332332
333- if (! ArraySize (array) && ! silent) {
334- new error[192 ]; formatex (error, charsmax (error), " Nothing loaded from ^" % s^ " ." , file_path);
335- set_fail_state (error);
333+ if (! ArraySize (array)) {
334+ if (! silent) {
335+ new error[192 ]; formatex (error, charsmax (error), " Nothing loaded from ^" % s^ " ." , file_path);
336+ set_fail_state (error);
337+ }
338+ return 0 ;
336339 }
337340
338341 if (! silent) {
@@ -342,6 +345,8 @@ load_maplist(Array:array, const file[], bool:silent = false)
342345 new ret;
343346 ExecuteForward (g_hForwards[MAPLIST_LOADED], ret, array);
344347 }
348+
349+ return 1 ;
345350}
346351// -----------------------------------------------------//
347352// Vote stuff
0 commit comments