warning 203: symbol is never used:
#1

Hi,
I'm making a rape command for my Cops And Robbers server.
I have the following problem.
Whenever I try to compile my gamemode I get this warning.

warning 203: symbol is never used: RapesNames, but I'm actually using it..

Code:
pawn Код:
new RapesNames[][] =
{
    "Chlamydia",
    "Syphilis",
    "Gonorrhea",
    "HPV",
    "STD",
    "Hepatitis B"
};
Below the command..
pawn Код:
//Some stuff here..

new rand;
rand = random(sizeof(RapesNames));
SendFMessage(INVALID_PLAYER_ID, COLOR_MAROON, "%s has been infected of %s by %s.", Name(targetid), rand, Name(playerid));
Can you help me to get rid of that annoying warning, please.
Thanks.
Reply
#2

sizeof doesn't count as 'using it'. 'rand' is just storing a random value, and you're displaying that value. Change 'rand' at the end of format to RapesNames[rand]. You should really use STDnames or something though - they're STDs, not 'rapes'.

Also, the grammar/English in that formatted messages is bad, try this:

%s has been infected with %s by %s

or

%s has infected %s with %s (better imo)
Reply
#3

EDIT: He beat me too it...
Reply
#4

Quote:
Originally Posted by MP2
Посмотреть сообщение
sizeof doesn't count as 'using it'. 'rand' is just storing a random value, and you're displaying that value. Change 'rand' at the end of format to RapesNames[rand]. You should really use STDnames or something though - they're STDs, not 'rapes'.

Also, the grammar/English in that formatted messages is bad, try this:

%s has been infected with %s by %s

or

%s has infected %s with %s (better imo)
Okay, it's fixed. Sorry for my bad english.
Reply
#5

Don't worry about it. Was just a friendly suggestion .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)