warning 215: expression has no effect
#1

Код:
((i+1) % 2) ? strcat(dstr, "{00f0f0}") : strcat(dstr, "{f0f000}");//alternating color to rows in dialog
C:\Users\userz\Desktop\Web Map loader_unloader Source\pawn\map.pwn(156) : warning 215: expression has no effect
C:\Users\userz\Desktop\Web Map loader_unloader Source\pawn\map.pwn(192) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#2

anyone? i'll rep+
Reply
#3

The ternary operator can't be used standalone like that. Either use normal if-else or use it like this:
pawn Код:
strcat(dstr, (i % 2) ? ("{f0f000}") : ("{00f0f0}"));
Extra brackets are necessary due to a bug in the compiler (blame ******).
Reply
#4

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)