SA-MP Forums Archive
Loading Hexadecimal numbers from MySQL 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Loading Hexadecimal numbers from MySQL DB (/showthread.php?tid=258218)



Loading Hexadecimal numbers from MySQL DB - steki. - 29.05.2011

Well, I'm creating a Gang FilterScript and I gotta load the Turf color from DB(Hex). I put(as structure) the Hex number as a String. But when it loads, I don't know what to do. If I print a %d it goes wrong, the same for %x I really don't know what to do.

PHP код:
            factionInfofactionid ][ fColor ]      = strvalfield[15] ); 

PHP код:
printf("[] Rank1: %s|Color: %d" factionInfofactionid ][ fRank1 ] ); 



Re: Loading Hexadecimal numbers from MySQL DB - steki. - 29.05.2011

Double


Re: Loading Hexadecimal numbers from MySQL DB - Joe Staff - 29.05.2011

Save it into the DB as an integer, in pawn 0xFF is exactly the same as 255