Question problem
#1

Hello,

i need some answer, i want to know why my terary condition don't work??

pawn Код:
stock XY(xx)
{
return ((xx == 0) ? "No" : "Yes");
}
Compiler has failed.

And where is bug

Thx
Reply
#2

pawn Код:
stock XY(xx)
{
if(xx == 0) return "No";
else return "Yes";
}
Reply
#3

Failed to compile ... again
Reply
#4

try this
pawn Код:
stock XY(xx)
{
if(xx == 0) return 0;
else return 1;
}
when you will check put condition like
pawn Код:
if(XY(u) == 0)
{
SendClientMessage(playerid,-1,"NO");
}
else
{
SendClientMessage(playerid,-1,"YES");
}
Reply
#5

I want this::

pawn Код:
format(...,"Var1: %s",XY(Var1));
etc.
Reply
#6

Thx for answer ******!!

It works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)