SA-MP Forums Archive
Mysql working with bools - 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 working with bools (/showthread.php?tid=578957)



Mysql working with bools - AroseKhanNiazi - 23.06.2015

pawn Код:
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "admin");
pAdmin is and bool
but this gives me error
pawn Код:
warning 213: tag mismatch

http://forum.sa-mp.com/converse.php?u=96478&u2=224659


Re: Mysql working with bools - Konstantinos - 23.06.2015

For booleans would be:
pawn Код:
PlayerInfo[playerid][..] = !!cache_get_field_content_int(0, "..");
but why admin level not be an integer that holds more than 0/1?


Re: Mysql working with bools - AroseKhanNiazi - 23.06.2015

No just a single value i don't have any kind of admin levels just another question what will be the password and username for localhost ?
As I didn't needed to enter one.


Re: Mysql working with bools - Konstantinos - 23.06.2015

As for testing, I use "root" and no password. Uploading to a host or vps though you better use a different user with a password for security.


Re: Mysql working with bools - AroseKhanNiazi - 23.06.2015

Yea thanks for the help.