Whats Wrong Here ?
#1

Warning:
Код:
(6459) : warning 205: redundant code: constant expression is zero
Line 6459:
Код:
ShowInfoBox(playerid, "House - Information", "You Have Successfully Sold Your House For $%d.\nSelling Fee: $%d.\nThe $%d In Your House Storage Have Been Transfered To Your Pocket.", ReturnProcent(GetHouseValue(h), HOUSE_SELLING_PROCENT), (GetHouseValue(h) - ReturnProcent(GetHouseValue(h), HOUSE_SELLING_PROCENT)), tmp);
Then I have this define:
Код:
#define ShowInfoBox(%0,%1,%2,%3) do{format(CMDSString, 1000, %2, %3); ShowPlayerDialog(%0, HOUSEMENU-1, DIALOG_STYLE_MSGBOX, %1, CMDSString, "Ok", "Close");}while(FALSE)
Why does it gives this warning ? I know its just warning but i like when my script is clean..

And second question: when I add Include <sscanf2> then pawno crashes.
Reply
#2

BUMP GOD.
Reply
#3

Try deleting all the spaces in your macro, not sure if that is the problem though.
Reply
#4

Tried it, It's not the problem :S:S:S:S
Reply
#5

pawn Код:
while(FALSE)
Doesn't work just like that. Otherwise it will throw that warning.

pawn Код:
new FALSE = 0;
#define ShowInfoBox(%0,%1,%2,%3) do { format(CMDSString, 1000, %2, %3); ShowPlayerDialog(%0, HOUSEMENU-1, DIALOG_STYLE_MSGBOX, %1, CMDSString, "Ok", "Close"); } while(FALSE)
Reply
#6

Added this
Код:
new FALSE = 0;
Quote:

K(191) : error 020: invalid symbol name ""

Reply
#7

BUMP, I hate warnings
Reply
#8

That has to do with something else in the script, as that being compiled worked perfectly for me.
Not to mention that variable name is valid.

Quote:

020 invalid symbol name
Symbol name
syntax: 88 A symbol may start with a letter, an underscore or an \at" sign (\@")
and may be followed by a series of letters, digits, underscore characters
and \@" characters.

Reply
#9

Ahh, I see what you have done wrong now. Use lowercase false .
Reply
#10

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Ahh, I see what you have done wrong now. Use lowercase false .
Will not work. As false is a pre-defined keyword, which is 0. Just like true is 1.
And naming the variable lowercase will throw errors. Not to mention that's the reason why its uppercase...
Also its valid variable named syntax...

And just using false instead of an variable will throw the redundant warnings, so use a variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)