Strange function bug
Mark Wieder
mwieder at ahsoftware.net
Sat Nov 18 11:57:04 EST 2006
Matt-
Friday, November 17, 2006, 4:22:22 PM, you wrote:
> I was recently creating a stack when I noticed that one of my functions
> wouldn't work right. After some further investigation, i realized that the
> function was not getting the second param that I was passing it. So, just
> for fun, I swapped the two params in the function and in the script, and now
> the other variable always turned up empty. If anyone could shed light on
> this problem i would appreciate it.
This has bitten me before, too. Usually what I find is that I have
managed to package up two parameters into what the called function
sees as a single parameter. Check the paramCount in your function and
make sure it's not 1. Watch those parentheses. Try this:
get hello((3,4))
function hello pParamX, pParamY
put the paramCount
end hello
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list