Skip to content

Commit

Permalink
Fix minor warnings and formatting
Browse files Browse the repository at this point in the history
Some functions weren't being used, so I added stock to stop compiler mention them. Also fixed some incorrect indentation.
  • Loading branch information
rtxa committed Sep 3, 2024
1 parent 13fbd03 commit 4d31281
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions valve/addons/amxmodx/scripting/agmodx_ctf.sma
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ AddPointsToTeamScore(teamIndex, points) {
return 0;
}

CtfHudMessage(id, const playerMsg[] = "", const teamMsg[] = "", const nonTeamMsg[] = "") {
stock CtfHudMessage(id, const playerMsg[] = "", const teamMsg[] = "", const nonTeamMsg[] = "") {
new teamName[16];
hl_get_user_team(id, teamName, charsmax(teamName));

Expand Down Expand Up @@ -453,7 +453,7 @@ CtfHudMessage(id, const playerMsg[] = "", const teamMsg[] = "", const nonTeamMsg
*
* @note The messages should be translation keys that can be used to retrieve the localized message from a translation file.
*/
CtfTeamHudMessage(team, const teamMsg[], nonTeamMsg[]) {
stock CtfTeamHudMessage(team, const teamMsg[], nonTeamMsg[]) {
set_hudmessage(255, 255, 255, -1.0, 0.75, 2, 0.03, 5.0, 0.03, 0.5);

new playersTeam[32], numTeam;
Expand Down Expand Up @@ -1072,7 +1072,7 @@ Float:StrToVec(const string[], Float:vector[3]) {
vector[i] = str_to_float(arg[i]);
}

bool:array_search(value, array[], size) {
stock bool:array_search(value, array[], size) {
new bool:match;
for (new i; i < size; i++)
if (array[i] == value)
Expand Down
16 changes: 8 additions & 8 deletions valve/addons/amxmodx/scripting/include/agmodx_stocks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ stock bool:is_str_num_ex(const sString[]) {
new i = 0;
new bool:is_negative = false;

if (sString[0] == '-') {
is_negative = true;
i++;
}
if (sString[0] == '-') {
is_negative = true;
i++;
}

while (sString[i] && isdigit(sString[i])) {
i++;
}
while (sString[i] && isdigit(sString[i])) {
i++;
}

return sString[i] == 0 && i != (is_negative ? 1 : 0);
return sString[i] == 0 && i != (is_negative ? 1 : 0);
}

0 comments on commit 4d31281

Please sign in to comment.