View Single Post
  #14  
Old 01-27-2011, 01:50 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by MrOmega View Post
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(12);
}

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(12);
}

function 
getSomevalue() {
  echo(
"getsomevalue: " params);
  echo(
"getsomevalue params: " a SPC b SPC c SPC d);

echos..

PHP Code:
== Created ==
getsomevalue
getsomevalue params0 10  
== Clicked ==
MouseDown0,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.
__________________
Quote:
Reply With Quote