SA-MP Forums Archive
[MySQL R41-2] Is there any way to retrieve a bool value from my DB? - 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: [MySQL R41-2] Is there any way to retrieve a bool value from my DB? (/showthread.php?tid=630657)



[MySQL R41-2] Is there any way to retrieve a bool value from my DB? - nikotragedy - 17.03.2017

I have a bool variable which determines if the player is either dead or alive, but I have no idea how can I obtain those values.

I was thinking about converting the boolean into a int, but that would screw up my code.
Any idea?

Edit 1: Nevermind, I was reading documentation but there was nothing about a cache_get_value_bool, I just tried because I had nothing else to try and it's compiling.


Re: [MySQL R41-2] Is there any way to retrieve a bool value from my DB? - Cypress - 17.03.2017

Quote:
Originally Posted by nikotragedy
Посмотреть сообщение
I have a bool variable which determines if the player is either dead or alive, but I have no idea how can I obtain those values.

I was thinking about converting the boolean into a int, but that would screw up my code.
Any idea?

Edit 1: Nevermind, I was reading documentation but there was nothing about a cache_get_value_bool, I just tried because I had nothing else to try and it's compiling.
I was looking for this as well and found out this in a_mysql.inc

pawn Код:
#define cache_get_value_bool(%1) cache_get_value_int(%1)
There'd be no difference if you'd use cache_get_value_int as you see but guess it's going to be more clear in the script that it's a bool value.