open.mp forum
[Pawn] warning 239: literal array/string passed to a non-const parameter - 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] warning 239: literal array/string passed to a non-const parameter (/showthread.php?tid=2169)



warning 239: literal array/string passed to a non-const parameter - Ambarita - 2021-07-15

SendRconCommand("exit");



This is inside a mysql connection code where if failed to connect then rcon exit.



I don't want to disable the warning, how can i fix this properly?


RE: warning 239: literal array/string passed to a non-const parameter - Kwarde - 2021-07-16

https://github.com/pawn-lang/sa-mp-fixes



That include does (should do) the trick


RE: warning 239: literal array/string passed to a non-const parameter - Ambarita - 2021-07-16

(2021-07-16, 12:08 AM)Kwarde Wrote: https://github.com/pawn-lang/sa-mp-fixes



That include does (should do) the trick



Many thanks.