Summary
The custom effect defined at line 248 of ApiFloodgate.sk intercepts Skript's
built-in add ... to ... effect, breaking arithmetic and list additions
across the entire server.
Affected code
ApiFloodgate.sk, line 248:
effect add %objects% to [form] %object%:
Because [form] is optional, the pattern also matches the plain shape
add %objects% to %object%, which is identical to the built-in
add ... to ... effect. As a result, statements like add 1 to {_i}
get parsed as THIS custom effect instead of the built-in one. The trigger
then runs its form-building logic (split by "[;;]", dropdown/button checks,
etc.), none of which applies, and the target variable is left unchanged.
Minimal reproduction
With ApiFloodgate.sk loaded:
command /addbug:
trigger:
set {_i} to 1
add 1 to {_i}
send "add result: %{_i}%" # prints 1, expected 2
set {_x} to 1
set {_x} to {_x} + 1
send "plus result: %{_x}%" # prints 2 (correct)
add 1 to {_i} does not increment, while set {_x} to {_x} + 1 works,
confirming the built-in add effect is being shadowed.
Impact
Server-wide. Every add X to {variable} in every script silently does
nothing useful once this file is loaded — both numeric counters and list
appends are affected. No error is shown, which makes it very hard to trace.
Suggested fix
Make the form keyword required so the pattern no longer collides with the
built-in effect:
effect add %objects% to form %object%:
(Note: this requires callers to write add ... to form {_form} instead of
add ... to {_form}.)
Workaround (for users)
Use set {var} to {var} + 1 for counters, or write component additions as
add ... to form {_form} after applying the fix above.
Environment
- Skript + Skript-Reflect + Floodgate (as listed in the file header)
Summary
The custom effect defined at line 248 of ApiFloodgate.sk intercepts Skript's
built-in
add ... to ...effect, breaking arithmetic and list additionsacross the entire server.
Affected code
ApiFloodgate.sk, line 248:
Because
[form]is optional, the pattern also matches the plain shapeadd %objects% to %object%, which is identical to the built-inadd ... to ...effect. As a result, statements likeadd 1 to {_i}get parsed as THIS custom effect instead of the built-in one. The trigger
then runs its form-building logic (split by "[;;]", dropdown/button checks,
etc.), none of which applies, and the target variable is left unchanged.
Minimal reproduction
With ApiFloodgate.sk loaded:
add 1 to {_i}does not increment, whileset {_x} to {_x} + 1works,confirming the built-in
addeffect is being shadowed.Impact
Server-wide. Every
add X to {variable}in every script silently doesnothing useful once this file is loaded — both numeric counters and list
appends are affected. No error is shown, which makes it very hard to trace.
Suggested fix
Make the
formkeyword required so the pattern no longer collides with thebuilt-in effect:
(Note: this requires callers to write
add ... to form {_form}instead ofadd ... to {_form}.)Workaround (for users)
Use
set {var} to {var} + 1for counters, or write component additions asadd ... to form {_form}after applying the fix above.Environment