Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Shared functions pack (https://forums.graalonline.com/forums/showthread.php?t=81277)

Crow 06-18-2012 07:59 AM

Quote:

Originally Posted by DrakilorP2P (Post 1697547)
rgbtohex() returns the wrong hex for me too.

Well, however it is written, it should probably just use format() instead:
PHP Code:

function RGBtoHex(redgreenblue)
  return 
format("#%.2x%.2x%.2x"red 255green 255blue 255); 


Skyld 06-18-2012 12:31 PM

Quote:

Originally Posted by Crow (Post 1644941)
What's wrong with rgbtohex()? shared.rgbtohex(1, 0, 0) returns #0F0000 for me; should be #FF0000 instead. Also, how come rgbtohex() and hextorgb() seem to return more than they should using v6? I always get stuff like "#0F0000 1 0 1" as a return value.

I'll investigate this afternoon.

Edit: should be fixed now.


All times are GMT +2. The time now is 05:45 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.