|
|
Folks,
I am still learning functions ... I wanted to create something like:
#declare foo = function(a,b,c) {
#if (a>0.0)
#declare a=a+1;
#end
a+b+c
}
My problem seems to be that the formal parameters supplied to the function
don't seem to be in scope for the expressions. It is as thought they were
not declared. When I try and run this, I get:
-----
File: C:\Documents and Settings\kolban\My Documents\My
3D\Projects\Tiles\test.inc Line: 2
#declare foo = function(a,b,c) {
#if (a <----ERROR
Parse Error: Expected 'numeric expression', undeclared identifier 'a' found
instead
Returned from renderer with error status
-----
Am I not allowed to use function parameters in the conditionals within my
function body?
Neil
Post a reply to this message
|
|