28.05.2011, 01:02
(
Последний раз редактировалось Unknown123; 28.05.2011 в 01:45.
Причина: SOLVED!
)
What is wrong with this define?
Gives me these warnings where i use it
EDIT!
Solved:
pawn Код:
#define SendFormattedMessage(%0,%1,%2,%3) \
{ \
do \
{ \
new _string_[128]; \
format(_string_, sizeof(_string_), %2, %3); \
SendClientMessage(%0, %1, _string_); \
} \
while(false); \
}
Код:
C:\Users\...\Desktop\...\gamemodes\....pwn(582) : warning 205: redundant code: constant expression is zero C:\Users\...\Desktop\...\gamemodes\....pwn(582) : warning 217: loose indentation C:\Users\...\Desktop\...\gamemodes\....pwn(582) : error 036: empty statement
Solved:
pawn Код:
#define SendClientMessageEx(%0,%1,%2,%3) \
do \
{ \
if(strlen(%2) > 0) \
{ \
new _string_[128]; \
format(_string_, sizeof(_string_), %2, %3); \
SendClientMessage(%0, %1, _string_); \
} \
} \
while(FALSE)