Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction of typos in variable names and types. #18

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cstrike/addons/amxmodx/scripting/include/regg.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define REGG_MAJOR_VERSION 0
#define REGG_MINOR_VERSION 4
#define REGG_MAINTENANCE_VERSION 35
#define REGG_MAINTENANCE_VERSION 36

#define REGG_VERSION str_to_num(fmt("%d%d%d", REGG_MAJOR_VERSION, REGG_MINOR_VERSION, REGG_MAINTENANCE_VERSION))
#define REGG_VERSION_STR fmt("%d.%d.%d-alpha", REGG_MAJOR_VERSION, REGG_MINOR_VERSION, REGG_MAINTENANCE_VERSION)
Expand Down Expand Up @@ -51,10 +51,10 @@ enum ReGG_Result {
ReGG_ResultFinish,
};

enum ReGG_ChangetType {
ReGG_ChangetTypeSet,
ReGG_ChangetTypeAdd,
ReGG_ChangetTypeSub,
enum ReGG_ChangeType {
ReGG_ChangeTypeSet,
ReGG_ChangeTypeAdd,
ReGG_ChangeTypeSub,
};

forward ReGG_StartPre(const ReGG_Mode:mode);
Expand Down
32 changes: 16 additions & 16 deletions cstrike/addons/amxmodx/scripting/regg/natives.inl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public bool:NativeSetPoints(const plugin, const argc) {
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

new ReGG_ChangetType:type = ReGG_ChangetTypeSet;
new ReGG_ChangeType:type = ReGG_ChangeTypeSet;
if (argc >= arg_type) {
type = ReGG_ChangetType:get_param(arg_type);
type = ReGG_ChangeType:get_param(arg_type);
}

new bool:forwards = false;
Expand All @@ -121,11 +121,11 @@ public bool:NativeSetPoints(const plugin, const argc) {
}

switch (type) {
case ReGG_ChangetTypeAdd: {
case ReGG_ChangeTypeAdd: {
return bool:(addPoints(player, get_param(arg_value), forwards) != ReGG_ResultNone);
}

case ReGG_ChangetTypeSub: {
case ReGG_ChangeTypeSub: {
return bool:(subPoints(player, get_param(arg_value), forwards) != ReGG_ResultNone);
}
}
Expand Down Expand Up @@ -161,9 +161,9 @@ public bool:NativeSetTeamPoints(const plugin, const argc) {
new slot = get_param(arg_slot);
CHECK_NATIVE_SLOT(slot, false)

new ReGG_ChangetType:type = ReGG_ChangetTypeSet;
new ReGG_ChangeType:type = ReGG_ChangeTypeSet;
if (argc >= arg_type) {
type = ReGG_ChangetType:get_param(arg_type);
type = ReGG_ChangeType:get_param(arg_type);
}

new bool:forwards = false;
Expand All @@ -172,11 +172,11 @@ public bool:NativeSetTeamPoints(const plugin, const argc) {
}

switch (type) {
case ReGG_ChangetTypeAdd: {
case ReGG_ChangeTypeAdd: {
return bool:(addTeamPoints(slot, get_param(arg_value), forwards) != ReGG_ResultNone);
}

case ReGG_ChangetTypeSub: {
case ReGG_ChangeTypeSub: {
return bool:(subTeamPoints(slot, get_param(arg_value), forwards) != ReGG_ResultNone);
}
}
Expand Down Expand Up @@ -211,9 +211,9 @@ public bool:NativeSetLevel(const plugin, const argc) {
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)

new ReGG_ChangetType:type = ReGG_ChangetTypeSet;
new ReGG_ChangeType:type = ReGG_ChangeTypeSet;
if (argc >= arg_type) {
type = ReGG_ChangetType:get_param(arg_type);
type = ReGG_ChangeType:get_param(arg_type);
}

new bool:forwards = false;
Expand All @@ -222,11 +222,11 @@ public bool:NativeSetLevel(const plugin, const argc) {
}

switch (type) {
case ReGG_ChangetTypeAdd: {
case ReGG_ChangeTypeAdd: {
return bool:(addLevel(player, get_param(arg_value), forwards) != ReGG_ResultNone);
}

case ReGG_ChangetTypeSub: {
case ReGG_ChangeTypeSub: {
return bool:(subLevel(player, get_param(arg_value), forwards) != ReGG_ResultNone);
}
}
Expand Down Expand Up @@ -262,21 +262,21 @@ public bool:NativeSetTeamLevel(const plugin, const argc) {
new slot = get_param(arg_slot);
CHECK_NATIVE_SLOT(slot, false)

new ReGG_ChangetType:type = ReGG_ChangetTypeSet;
new ReGG_ChangeType:type = ReGG_ChangeTypeSet;
if (argc >= arg_type) {
type = ReGG_ChangetType:get_param(arg_type);
type = ReGG_ChangeType:get_param(arg_type);
}

new bool:forwards = false;
if (argc >= arg_forwards) {
forwards = bool:get_param(arg_forwards);
}
switch (type) {
case ReGG_ChangetTypeAdd: {
case ReGG_ChangeTypeAdd: {
return bool:(addTeamLevel(slot, get_param(arg_value), forwards) != ReGG_ResultNone);
}

case ReGG_ChangetTypeSub: {
case ReGG_ChangeTypeSub: {
return bool:(subTeamLevel(slot, get_param(arg_value), forwards) != ReGG_ResultNone);
}
}
Expand Down
4 changes: 2 additions & 2 deletions cstrike/addons/amxmodx/scripting/regg_store_points.sma
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public ReGG_PlayerJoinPre(const id) <enabled> {

if(mode == ReGG_ModeSingle || mode == ReGG_ModeFFA) {
TrieGetArray(Store, auth, store, sizeof store);
ReGG_SetPoints(id, store[StorePoints], ReGG_ChangetTypeSet);
ReGG_SetLevel(id, store[StoreLevel], ReGG_ChangetTypeSet);
ReGG_SetPoints(id, store[StorePoints], ReGG_ChangeTypeSet);
ReGG_SetLevel(id, store[StoreLevel], ReGG_ChangeTypeSet);
}
return PLUGIN_HANDLED;
}
Expand Down
Loading