Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [SOLVED] (warning) literal array/string passed to a non-const parameter

 
  • 0 Vote(s) - 0 Average
Pawn [SOLVED] (warning) literal array/string passed to a non-const parameter
cosine
Offline

Burgershot Member
Posts: 3
Threads: 1
Joined: Apr 2020
Reputation: 0
#1
2020-05-26, 04:26 PM (This post was last modified: 2020-05-26, 06:15 PM by cosine.)
As the title said,
Right now im using the new compiler and sampctl, and having this problem with warning
PHP Code:
(warning) literal 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(playerid, DIALOG_RESPSIONIS_PEMERINTAH, DIALOG_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"
 
], 
cosine
Offline

Burgershot Member
Posts: 3
Threads: 1
Joined: Apr 2020
Reputation: 0
#2
2020-05-26, 06:15 PM
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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode