diff --git a/mapchooser_extended/scripting/mapchooser_extended.sp b/mapchooser_extended/scripting/mapchooser_extended.sp index df55f96b..7a9f48a8 100755 --- a/mapchooser_extended/scripting/mapchooser_extended.sp +++ b/mapchooser_extended/scripting/mapchooser_extended.sp @@ -2001,13 +2001,14 @@ public int Native_RemoveNominationByOwner(Handle plugin, int numParams) /* native InitiateMapChooserVote(); */ public int Native_InitiateVote(Handle plugin, int numParams) { - MapChange when = view_as(GetNativeCell(1)); - Handle inputarray = view_as(GetNativeCell(2)); + MapChange when = view_as(GetNativeCell(1)); + Handle inputarray = view_as(GetNativeCell(2)); - LogAction(-1, -1, "Starting map vote because outside request"); + LogAction(-1, -1, "Starting map vote because outside request"); - SetupWarningTimer(WarningType_Vote, when, inputarray); - //InitiateVote(when, inputarray); + SetupWarningTimer(WarningType_Vote, when, inputarray); + //InitiateVote(when, inputarray); + return 0; } public int Native_CanVoteStart(Handle plugin, int numParams) @@ -2027,18 +2028,19 @@ public int Native_EndOfMapVoteEnabled(Handle plugin, int numParams) public int Native_GetExcludeMapList(Handle plugin, int numParams) { - Handle array = view_as(GetNativeCell(1)); - if(array == INVALID_HANDLE) - return; + Handle array = view_as(GetNativeCell(1)); + if(array == INVALID_HANDLE) + return 0; - static char map[PLATFORM_MAX_PATH]; - StringMapSnapshot OldMapListSnapshot = g_OldMapList.Snapshot(); - for(int i = 0; i < OldMapListSnapshot.Length; i++) - { - OldMapListSnapshot.GetKey(i, map, sizeof(map)); - PushArrayString(array, map); - } - delete OldMapListSnapshot; + static char map[PLATFORM_MAX_PATH]; + StringMapSnapshot OldMapListSnapshot = g_OldMapList.Snapshot(); + for(int i = 0; i < OldMapListSnapshot.Length; i++) + { + OldMapListSnapshot.GetKey(i, map, sizeof(map)); + PushArrayString(array, map); + } + delete OldMapListSnapshot; + return 0; } //GetNominatedMapList @@ -2048,7 +2050,7 @@ public int Native_GetNominatedMapList(Handle plugin, int numParams) Handle ownerarray = view_as(GetNativeCell(2)); if(maparray == INVALID_HANDLE) - return; + return 0; static char map[PLATFORM_MAX_PATH]; CheckMapRestrictions(true, true); @@ -2071,6 +2073,7 @@ public int Native_GetNominatedMapList(Handle plugin, int numParams) } } } + return 0; } // Functions new to Mapchooser Extended @@ -2538,7 +2541,8 @@ public int Native_AreRestrictionsActive(Handle plugin, int numParams) public int Native_SimulateMapEnd(Handle plugin, int numParams) { - OnMapEnd(); + OnMapEnd(); + return 0; } stock void AddMapItem(const char[] map)