• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] YSI INI_Load and Command_ReProcess const correctness
#1
Hi, I have asked about this same problem about a year ago but got no answers.

Yesterday I decided to check back on my script and found the same issue still presists, so I ask now:



I use the y_commands function "Command_ReProcess" to call commands from the script, as in "to fake commands". This means that when a player does something, I might call the command "/quitrace" for example, to make sure the player's actions don't interfere with the ongoing race they are participating.



I can no longer pass literal strings into this function, as the compiler comes up with warnings. How can I keep using the function like this while keeping the warnings away? Or am I misusing the function in some way?



Another, seemingly obvious (to me) false positive comes from using INI_Load with a pre-determined file - I load my server's saved information from a file with a static filename in the server files, but now by passing a literal string as the filename I get const correctness errors.



Any ideas to fix this?





I used sampctl ensure to check that all dependencies are at their newest version, but maybe I am doing something wrong. I never really had time to learn to use sampctl.
  Reply


Messages In This Thread
YSI INI_Load and Command_ReProcess const correctness - by Jarnokai - 2020-12-21, 12:06 PM

Forum Jump: