xyz.pwn(22109) : warning 214: possibly a "const" array argument was intended: "string"
#6

The warning is not about expecting constant array but passing a literal value. Make a crime list that you can access anywhere.
pawn Code:
enum
{
    CRIME_UNKNOWN, // constant, its value is 0
    CRIME_FIRST_DEGREE_MURDER // constant, its value is 1
}

new const CrimeList[][] =
{
    "Unknown", // index 0
    "First Degree Murder" // index 1
};
pawn Code:
if(PlayerInfo[playerid][pTeam] != 5) SetPlayerCriminal(killerid, CrimeList[CRIME_UNKNOWN], CrimeList[CRIME_FIRST_DEGREE_MURDER ], 1);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)