max return value ...

max return value ...

Post by cey » Wed, 13 Jun 2001 06:54:53

Hi, i'm scripting a little stuff with max , but i have a problem with the
return value of a fonction. Here is the fonction :


Global angle = 0
Global sample = 4

function calcangle sample angle =
angle = 360/sample
return angle

return angle


After, when i'm using the return value 'angle', she still contain  her
initializing value: ( 0) and not the value calculate in the fonction '
calcangle'  WHY ????

please  help me !!!

thaks a lot bye bye...

Clment Vidal



1. POV-Ray 3.1 : Returning a value!

OK, I am really pissed off because I can't figure it out...I've RTFM many
times (mainly the sections and, and I still can't figure it
out.  I am making a 'plug-in' that requires the use of randomly generated
numbers.  I also wanted them to be negative numbers as well.  So, I created a
macro that would return a +1 or a -1 (randomly)...but I can't figure out how
to have that value returned.  I have something like this:

#macro Sign()
  #local S=seed(clock);
  #local R=rand(S);

  #if(R <= .5)

I don't know if that is right or not, but I hope you can see what I am up to.
I know there is another way to generate random values from -1 to 1
(like: #local R=(rand(S)*2)-1 but just for now, I want to know how to return

BTW, I wonder why POV-Ray Team could've just implemented a #return directive
It would make things really easy...and this shouldn't limit to numbers.


Gautam N. Lad / Vimal N. Lad

- Website:
- ICQ #7196672

2. Epson Support of Stylus Color Printer w/ the Mac??

3. returned from-0 value-2 days in-help!

4. glHistogramExt on Maximum Impact

5. what gversion values can an O2 return?

6. POV Visual Spline Editor for the Mac?

7. Odd return values from LScript Control Objects.

8. Measuring the degree of similarity between two pictures

9. Return-Value of function

10. Values returned from glReadPixels slightly off.

11. Click Return Value

12. Using Z value returned by gluProject

13. MEL-Returning value of variable name