MySQL CONV exceeds integer boundries?
#1

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?
Reply
#2

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
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)