Quote:
Originally Posted by MrOmega
Here's an issue I'm having. I'm using GraalControl.onMouseDown() and call a function from within side this. Now within this function I call another and same again in the next function. The params in getDist() are always the params of onMouseDown(), not the ones I send.
Basically in getDist the params are that of onMouseDown() regardless.
|
Provide an actual working script (especially in Bug Reports) with some output if you want to help get the issue resolved.
Edit: So it's intentional.
PHP Code:
//#CLIENTSIDE
function onCreated() {
echo("== Created ==");
getSomevalue(1, 2);
}
function GraalControl.onMouseDown() {
echo("== Clicked ==");
echo("MouseDown: " @ params);
somefunction();
this.scheduleevent(1, "CheckParams", "");
}
function onCheckParams() {
echo("check: " @ params);
}
function somefunction() {
echo("somefunction: " @ params);
someotherfunction();
}
function someotherfunction() {
echo("someotherfunction: " @ params);
temp.getsomething = getSomevalue(1, 2);
}
function getSomevalue() {
echo("getsomevalue: " @ params);
echo("getsomevalue params: " @ a SPC b SPC c SPC d);
}
echos..
PHP Code:
== Created ==
getsomevalue:
getsomevalue params: 0 10
== Clicked ==
MouseDown: 0,414,540,1,0
somefunction: 0,414,540,1,0
someotherfunction: 0,414,540,1,0
getsomevalue: 0,414,540,1,0
getsomevalue params: 0 10
check: "",
My advice, don't rely on the params array when you can specify parameters in the function. In your case just add a second function.