if(!isset($_REQUEST['u'])){
					die("No Username Set");
				}else{
					if(!$GLOBALS['UBP']['User']->userExists($_REQUEST['u'])){
						die();
					}else{
						$Data = $GLOBALS['UBP']['User']->Get($_REQUEST['u'], '*');
					}
				}
				$PCent = percent($Data['energy_current'], $Data['energy_max']);
				$per = imagecreate(102,20);
				$background = imagecolorallocate($per, 0xFF, 0xFF, 0xFF);
				$foreground = imagecolorallocate($per, 0x00, 0x8A, 0x01);
				$border = imagecolorallocate($per, 0x99, 0x99, 0x99);
				$grad = imagecreatefrompng(ENERGY_GRAD_BAR);
				$per2 = imagecopy($per, $grad, 1, 1, 0, 0, $PCent, 5);
				imagerectangle($per, 0, 0, 301, 20, $border);
				header("Content-type: image/png");
				imagepng($per);

This code just wont work and i dont know why but it says it contains errors.
ENERGY_GRAD_BAR = C:\Web\www\includes/../shared/tpl/php_images/health_bar.png

i done some debuging and values are correct $PCent = 100; ENERGY_GRAD_BAR is correct value i just dont get why it wont work.

Thanks in advanced 🙂

    fixed, there was a space in a document that didnt like the header 😛 simples XD

      Write a Reply...