Mysql load help - 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 load help (
/showthread.php?tid=656540)
Mysql load help -
,TomY' - 18.07.2018
Hi. I have mysql clan load:
Код:
cache_get_field_content(i, "cOwner", cdb [i][cOwner], MysqlConnection, MAX_PLAYER_NAME);
cdb [i][cPos][0] = cache_get_field_content_float (i, "cX");
cdb [i][cPos][1] = cache_get_field_content_float (i, "cY");
cdb [i][cPos][2] = cache_get_field_content_float (i, "cZ");
And now i try to load color code from mysql table ( 0xFFFFFFAA ). How to load that code? I tryed like this, but it not working..
Код:
cache_get_field_content(i, "ccolor", cdb [i][ccolor], MysqlConnection, 100);
Re: Mysql load help -
Florin48 - 18.07.2018
but in the database is the color saved?
Re: Mysql load help -
,TomY' - 18.07.2018
Yes. Saved. ccolor - 0xFFFFFFAA
Re: Mysql load help -
RIDE2DAY - 18.07.2018
Give a try saving/loading the color as an integer, using %d and cache_get_field_content_int.
Re: Mysql load help -
,TomY' - 18.07.2018
Quote:
Originally Posted by RIDE2DAY
Give a try saving/loading the color as an integer, using %d and cache_get_field_content_int.
|
Same :/
Re: Mysql load help -
,TomY' - 18.07.2018
In mysql table ccolor saved as code - 0xFFFFFFAA
Re: Mysql load help -
silvan - 18.07.2018
save it as a string, in the database, and load it as a string, soppose it will work. and make sure the SQL statement is good, it soppose to work
Re: Mysql load help -
,TomY' - 18.07.2018
Solved. Thanks all for help.
Re: Mysql load help -
silvan - 18.07.2018
please +rep if my post helped <3