[PHP] I cannot figure this one out! I'm going crazy! :)

2001-10-29 Thread Richard Marks

mebbe you can figure out why this dont work! :)

Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN TO PUBLIC,SORRY) 
/www.gzmsoftware.f2s.com/php/fractal.php on line 2



?
function box( int $im,int $x,int $y,int $x2,int $y2,int $color )
{
 imageline( $im,$x,$y,$x2,$y,$color );
 imageline( $im,$x,$y2,$x2,$y2,$color );
 imageline( $im,$x,$y,$x,$y2,$color );
 imageline( $im,$x2,$y,$x2,$y2,$color );
}
function Square(int $x,int $y,int $size,int $pcolor )
{
 if ($size  50)
  break;
 box($img,$x,$y,$x+$size,$y-$size,$pcolor );
 Square($x-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 Square($x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
Header (Content-type: image/png);
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
imagerectangle($img,0,0,$width,$height,$color);
Square ( -1000,1000,2000,$pixel_color );
imagepng($img);
?



Please give me a hand.
thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com




[PHP] hmm, thanks, but now i have even more troubles :\

2001-10-29 Thread Richard Marks

thanks, but go here, and see what it does now.

http://www.gzmsoftware.f2s.com/php/fractal.html

can ya help mee?

thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



[PHP] arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something?

2001-10-29 Thread Richard Marks

what in the world is wrong here?



?
Header (Content-type: image/png);
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
function box( $img, $x, $y, $x2, $y2, $color )
{
 imageline( $img,$x,$y,$x2,$y,$color );
 imageline( $img,$x,$y2,$x2,$y2,$color );
 imageline( $img,$x,$y,$x,$y2,$color );
 imageline( $img,$x2,$y,$x2,$y2,$color );
}
function Square( $x, $y, $size, $pcolor )
{
 if ($size  50)
  break;
 box($img,$x,$y,$x+$size,$y-$size,$pcolor );
 Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
imagerectangle($img,0,0,$width,$height,$color);
Square ($img, -1000,1000,2000,$pixel_color );
imagepng($img);
?



thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



[PHP] and now i get

2001-10-29 Thread Richard Marks

hmm I found out that I had to add global $img; in my functions,
but dangit now I get this error!



br
bFatal error/b:  Cannot break/continue 1 levels
 in b/(MY PATH)/www.gzmsoftware.f2s.com/php/fractal.php/b on line b18/bbr

any clue?
thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com