open.mp forum
[Pawn] A bunch of warnings and errors - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] A bunch of warnings and errors (/showthread.php?tid=2482)



A bunch of warnings and errors - Jak - 2023-11-13

Hi. I just discovered open.mp and decided to give it a try with my old SA-MP gamemode. I managed to run the server just fine, but compiling the script causes some warnings and errors that just lead me nowhere.

What I have done:

Replaced #include <a_samp> with #include <open.mp>
Replaced #include <YSI\y_ini> with #include <YSI_Storage\y_ini>
downloaded the latest YSI library and pasted its content under include directory

Rest of the code is pretty much untouched

I am getting a these warnings and errors:


PHP Code:
warning 214possibly a "const" array argument was intended"user"
warning 239literal array/string passed to a non-const parameter (a LOT of these)
warning 234: function is deprecated (symbol "GetServerVarAsInt") Use `GetConsoleVarAsInt`.
warning 213tag mismatchexpected tag "bool"but found none ("_")
warning 213tag mismatchexpected tag "t_WEAPON"but found none ("_")
warning 234: function is deprecated (symbol "TextDrawBackgroundColor") Use `TextDrawBackgroundColour

I was under the impression that old SA-MP scripts were supported as-is. Could anyone point me in the right direction?

Thanks.


RE: A bunch of warnings and errors - Radical - 2023-11-16

Check this out
https://github.com/adib-yg/openmp-server-installation#compiler-errors-and-warnings

You can also use the upgrade tool