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

2001-10-29 Thread Mark Roedel

> -Original Message-
> From: Richard Marks [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, October 29, 2001 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] I cannot figure this one out! I'm going crazy! :)
> 
> 
> 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 )

Try changing this to

  function box ($im, $x, $y, $x2, $y2, $color)

(Also in your other function definition.)


---
Mark Roedel   | "Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained."
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-10-29 Thread Rasmus Lerdorf

You don't put type declarations in PHP functions.  ie. get rid of all the 
"int" things there on line two.

-Rasmus

On Mon, 29 Oct 2001, Richard Marks wrote:

> 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 General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]