SA-MP Forums Archive
MySQL CONV exceeds integer boundries? - 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 CONV exceeds integer boundries? (/showthread.php?tid=565323)



MySQL CONV exceeds integer boundries? - dusk - 26.02.2015

Hello,

I save some colours as strings in my database for readability.

When I load those colours into Pawn, I select them with CONV(value, 16, 10) function. The problem is that F7F9AEFF returns 4160335615 which is more than the integer limit.

So how are the colours handled in Pawn?

pawn Код:
SendClientMessage(playerid, 0xF7F9AEFF, "Yo")
This is completely valid, isn't it?

Is there something more hapening than just the base changing?


Re: MySQL CONV exceeds integer boundries? - Misiur - 26.02.2015

Nothing at all, except that pawn uses cell with size of 32 bits, so values are wrapped around. Your value is in fact stored as -134631681


Re: MySQL CONV exceeds integer boundries? - dusk - 26.02.2015

That's what I get for trying something different.. should have stayed with simple strval.. Thanks!