Question problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question problem (
/showthread.php?tid=333677)
Question problem -
Kaczmi - 12.04.2012
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
Re: Question problem -
mineralo - 12.04.2012
pawn Код:
stock XY(xx)
{
if(xx == 0) return "No";
else return "Yes";
}
Re: Question problem -
Kaczmi - 12.04.2012
Failed to compile ... again
Re: Question problem -
mineralo - 12.04.2012
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");
}
Re: Question problem -
Kaczmi - 13.04.2012
I want this::
pawn Код:
format(...,"Var1: %s",XY(Var1));
etc.
Re: Question problem -
Kaczmi - 13.04.2012
Thx for answer ******!!
It works