Closed PazerOP closed 1 year ago
Sorry for the lack of response, I haven't touched this project since 2018 :)
Chaining comparision operators like this is valid in sourcemod although undocumented it seems. You can try this out with a simple repro, such as:
public void OnPluginStart() {
if (1 > 0.8 > 0.7) {
PrintToServer("all good");
}
if (1 > 0.5 > 0.7) {
SetFailState("no good");
}
}
You can explicitly add parantheses around the first operation to get a bool out of it but the compiler will warn you about bool-float comparisions. Anyway, I'll separate it to 2 ops for clarity.
changed in af0880c262ad8b705d3ed8d7a97dc257f5266148
https://github.com/laurirasanen/groundfix/blob/b2d52d45bca2391eb2e3c9b8cc0e1c27b198c699/scripting/groundfix.sp#L247
This looks like a typo to me? According to sourcemod documentation, "the result [of comparison operators] is either true (non-zero) or false (zero)"