Define.
#6

Quote:
Originally Posted by _Jake_
Посмотреть сообщение
Is there any possible way to use this on displaying stuffs such as "Enable" if true and "Disable" false (print)
Is there anyway to do it without using the functions manually but this.

pawn Код:
new yes[4] = "Yes", no[3] = "No";
printf("Test: %s", TEST ? yes : no);
According to the above code, you can use simple macros to define :
pawn Код:
#define retTrueFalse(%0) (%0 == true ? ("Yes") : ("No"))

//Can be used as
new
    bool:test;

printf("%s", retTrueFalse(test));
Will print "Yes" if "test" is set to true, else "No".
Reply


Messages In This Thread
Define. - by JaKe Elite - 27.12.2014, 03:42
Re: Define. - by M4D - 27.12.2014, 04:31
Re: Define. - by JaKe Elite - 27.12.2014, 04:41
Re: Define. - by M4D - 27.12.2014, 05:07
Re: Define. - by JaKe Elite - 27.12.2014, 05:18
Re: Define. - by Lordzy - 27.12.2014, 06:46
Re: Define. - by JaKe Elite - 27.12.2014, 07:32
Re: Define. - by Lordzy - 27.12.2014, 07:34
Re: Define. - by JaKe Elite - 27.12.2014, 11:00
Re: Define. - by Lordzy - 30.12.2014, 08:32

Forum Jump:


Users browsing this thread: 2 Guest(s)