• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [SOLVED] (warning) literal array/string passed to a non-const parameter
#1
As the title said,

Right now im using the new compiler and sampctl, and having this problem with warning
PHP Code:
(warningliteral array/string passed to a non-const parameter 

There's so much line getting warning, and most of them is pointing to the line with function ShowPlayerDialog.



This is one of them.

PHP Code:
showDialogResepsionis(playerid){

? ?return 
ShowPlayerDialog(playeridDIALOG_RESPSIONIS_PEMERINTAHDIALOG_STYLE_LIST"Pilihan tindakan pengurusan data""KTP""Pilih""Batal");





Note : I have update to YSI 5.x and here is my depedencies

PHP Code:
"dependencies": [

 
"sampctl/samp-stdlib",

 
"Southclaws/samp-logger",

 
"pawn-lang/YSI-Includes",

 
"zeex/samp-plugin-crashdetect:v4.19.4",

 
"pawn-lang/[email protected]",

 
"samp-incognito/samp-streamer-plugin:v2.9.4",

 
"Southclaws/progress2",

 
"pBlueG/SA-MP-MySQL:R41-4",

 
"Southclaws/zcmd",

 
"maddinat0r/sscanf:v2.8.3",

 
"BigETI/pawn-memory:2.0.1"

 
], 
  Reply
#2
Solved.



Just realize that im using include that hook ShowPlayerDialog and set parameter with non-const string data type.

Solutions : Change all parameter with non-const string/array to const string/array.

Note : Use YSI 5.x for compiler 3.10.9 and YSI 4.x for compiler 3.10.8 or below



Thank you.
  Reply


Forum Jump: