Skip to content

Commit cbd9482

Browse files
committed
Fixes for 1.11 compiler
1 parent 1e25082 commit cbd9482

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

addons/sourcemod/scripting/hextags.sp

+9-3
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ public Action Cmd_ToggleTags(int client, int args)
385385
}
386386

387387
SetClientCookie(client, hVibilityCookie, bHideTag[client] ? "0" : "1");
388+
return Plugin_Handled;
388389
}
389390

390391
public Action Cmd_TagsList(int client, int args)
@@ -450,7 +451,7 @@ public int Handler_TagsMenu(Menu menu, MenuAction action, int param1, int param2
450451
SetClientCookie(param1, hSelTagCookie, sValue);
451452
PrintToChat(param1, "[SM] Setted %s tags", selectedTags[param1].TagName);
452453
}
453-
454+
return 0;
454455
}
455456

456457
public Action Cmd_GetTeam(int client, int args)
@@ -543,11 +544,13 @@ public void OnClientCookiesCached(int client)
543544
public Action RankMe_OnPlayerLoaded(int client)
544545
{
545546
RankMe_GetRank(client, RankMe_LoadTags);
547+
return Plugin_Continue;
546548
}
547549

548550
public Action RankMe_OnPlayerSaved(int client)
549551
{
550552
RankMe_GetRank(client, RankMe_LoadTags);
553+
return Plugin_Continue;
551554
}
552555

553556
public Action RankMe_LoadTags(int client, int rank, any data)
@@ -561,11 +564,12 @@ public Action RankMe_LoadTags(int client, int rank, any data)
561564
IntToString(iRank[client], sRank, sizeof(sRank));
562565

563566
if (selectedTags[client].ScoreTag[0] == '\0')
564-
return;
567+
return Plugin_Continue;
565568

566569
ReplaceString(selectedTags[client].ScoreTag, sizeof(CustomTags::ScoreTag), "{rmRank}", sRank);
567570
CS_SetClientClanTag(client, selectedTags[client].ScoreTag); //Instantly load the score-tag
568571
}
572+
return Plugin_Continue;
569573
}
570574

571575
public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
@@ -587,6 +591,7 @@ public Action ChangeRoundStatus(Handle timer)
587591
{
588592
bHasRoundEnded = false;
589593
hRoundStatusTimer = null;
594+
return Plugin_Continue;
590595
}
591596

592597
public void OnMapEnd() // required, because forcible change level doesn't fire "round_end" event
@@ -1115,7 +1120,7 @@ bool CheckSelector(const char[] selector, int client)
11151120
public Action Timer_ForceTag(Handle timer)
11161121
{
11171122
if (!bCSGO)
1118-
return;
1123+
return Plugin_Stop;
11191124

11201125
for (int i = 1; i <= MaxClients; i++)if (IsClientInGame(i) && selectedTags[i].ForceTag && selectedTags[i].ScoreTag[0] != '\0' && !bHideTag[i])
11211126
{
@@ -1130,6 +1135,7 @@ public Action Timer_ForceTag(Handle timer)
11301135

11311136
CS_SetClientClanTag(i, selectedTags[i].ScoreTag);
11321137
}
1138+
return Plugin_Continue;
11331139
}
11341140

11351141
//Frames

addons/sourcemod/scripting/include/SteamWorks.inc

+4-4
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ typeset SteamWorksHTTPDataReceived
270270

271271
typeset SteamWorksHTTPBodyCallback
272272
{
273-
function void (const char sData[]);
274-
function void (const char sData[], any value);
275-
function void (const int data[], any value, int datalen);
273+
function void (const char[] sData);
274+
function void (const char[] sData, any value);
275+
function void (const int[] data, any value, int datalen);
276276
};
277277

278278
#else
@@ -410,4 +410,4 @@ public __ext_SteamWorks_SetNTVOptional()
410410
MarkNativeAsOptional("SteamWorks_GetHTTPResponseBodyCallback");
411411
MarkNativeAsOptional("SteamWorks_WriteHTTPResponseBodyToFile");
412412
}
413-
#endif
413+
#endif

addons/sourcemod/scripting/include/hexstocks.inc

+14-8
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,16 @@ stock void SetPlayerWeaponAmmo(int client, int weaponEnt, int clip = -1, int amm
455455
* Gives an Item to a client removing the current weapon
456456
*
457457
* @param client Client Index
458-
* @param weapon
459-
* @return Itea Index
458+
* @param weapon
459+
* @return Item Index
460460
*/
461461
stock int GivePlayerItemRemove(int client, const char[] weapon, int slot)
462462
{
463-
if ((weapon = GetPlayerWeaponSlot(client, slot)) != -1)
463+
int current = -1;
464+
if ((current = GetPlayerWeaponSlot(client, slot)) != -1)
464465
{
465-
RemovePlayerItem(client, weapon);
466-
AcceptEntityInput(weapon, "Kill");
466+
RemovePlayerItem(client, current);
467+
AcceptEntityInput(current, "Kill");
467468
}
468469
return GivePlayerItem(client, weapon);
469470
}
@@ -554,7 +555,6 @@ stock int GetCmdArgInt(int argnum)
554555
GetCmdArg(argnum, value, sizeof(value));
555556
return StringToInt(value);
556557
}
557-
#endif
558558

559559
/**
560560
* Retrives a command argument given its index as float, from the console or server command
@@ -568,6 +568,7 @@ stock float GetCmdArgFloat(int argnum)
568568
GetCmdArg(argnum, value, sizeof(value));
569569
return StringToFloat(value);
570570
}
571+
#endif
571572

572573
/**
573574
* Retrives a command argument given its index as bool, from the console or server command
@@ -646,12 +647,12 @@ stock void SetCvarString(char[] cvarName, char[] value)
646647
if (StringCvar == null)return;
647648

648649
int flags = StringCvar.Flags;
649-
StringCvar &= ~FCVAR_NOTIFY;
650+
flags &= ~FCVAR_NOTIFY;
650651
StringCvar.Flags = flags;
651652
StringCvar.SetString(value)
652653

653654
flags |= FCVAR_NOTIFY;
654-
FloatCvar.Flags = flags;
655+
StringCvar.Flags = flags;
655656
}
656657

657658

@@ -911,8 +912,13 @@ stock bool Debug_Setup(bool server = false, bool console = true, bool chat = tru
911912

912913
stock bool Debug_Prefix(const char[] prefix)
913914
{
915+
#if defined DEBUG
914916
strcopy(sPrefix, sizeof(sPrefix), prefix);
917+
return true;
918+
#endif
919+
return false;
915920
}
921+
916922
stock bool Debug_Print(char[] format, any ...)
917923
{
918924
#if defined DEBUG

0 commit comments

Comments
 (0)