PDA

View Full Version : Mysql load help


,TomY'
18/07/2018, 07:31 AM
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);

Florin48
18/07/2018, 07:34 AM
but in the database is the color saved?

,TomY'
18/07/2018, 07:46 AM
Yes. Saved. ccolor - 0xFFFFFFAA

RIDE2DAY
18/07/2018, 07:56 AM
Give a try saving/loading the color as an integer, using %d and cache_get_field_content_int.

,TomY'
18/07/2018, 08:01 AM
Give a try saving/loading the color as an integer, using %d and cache_get_field_content_int.
Same :/

,TomY'
18/07/2018, 08:21 AM
In mysql table ccolor saved as code - 0xFFFFFFAA

silvan
18/07/2018, 09:24 AM
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

,TomY'
18/07/2018, 09:50 AM
Solved. Thanks all for help.

silvan
18/07/2018, 10:02 AM
please +rep if my post helped <3