Closed rt-2 closed 2 years ago
'addsiren' is an int in default sa-mp includes too, but if you use latest YSI (or any other libraries, idk exactly what else behaves the same for now) - you'll see such warnings. Regarding the problem itself, most likely such scripts also hooks some natives and modify their arguments in accordance with how it is possible now declared in the modified samp includes, thereby creating these compilation problems.
So, there is nothing I could do about it if we say in the context of the fact that anticheat still primarily supports standard (canonical) samp includes, and not modified ones. I think this is a problem with YSI and all similar scripts, which are increasingly starting to have problems with the default compiler/includes over time, although they fully supported them before.
UPD: Current y_iterate have exactly what I've mentioned, here. Probably you use that?
UPD: Current y_iterate have exactly what I've mentioned, here. Probably you use that?
So basically I should set addsiren
to a bool instead of int simply?
This should be changed to int in y_iterate to be a real solution (at least when default includes detected). Otherwise there still can be warnings on anticheat's hook of AddStaticVehicleEx.
Should we go around the problem and detect when YSI is included for kind of a solution even if not perfect?
The problem in that not just YSI can use such custom tags for those params in its hooks and it's pretty predictable in this way in the future, if it would be necessary to do exclusionary checks for a bunch of scripts that might be included with such style too.
The real solution to the problem is a return (and making sure that it does not break in the future by testing) support for default samp includes in libraries such as y_iterate and similar, thereby they will stop creating such problems ever again.
Anyway Im guessing for int and bool, true and false will just be the same bit-wise than the int 1/0 so we can ignore this and assume everything is stable? Thank you
Yeah, this continues to be stable as well as it continues to be stable with const-correctness warnings from the new compiler/includes. The only problem is the presence of these warnings and the fact that the user has to see them if he use YSI or modified samp includes.
Ok thank you.
Hi, When I use
AddStaticVehicleEx
it gives me this warning:this is the code that triggers the warning, if I remove this particular function from that line, the warning disappear:
addsiren
is an int.Thank you, rt-2
EDIT: Solution is to ignore the warning, this is still stable because bitwise, bool will act the same as int.