View Single Post
  #16  
Old 05-25-2010, 08:01 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by salesman View Post
The values of this.num1 and this.num2 are being passed as parameters, not the actual variables themselves. It would look like this:

<snip>
For some reason, the values werent going through unless i did something like this:

PHP Code:
function onActionServerSide(cmdv1v2) {
  if (
cmd == "calc_math") {
    
doMakeMathVar_S();
  }
}

doMakeMathVar_S(){
    
clientr.num params[1] + params[2]; // <-------
}

//#CLIENTSIDE

function onTimeout() {  
  
temp.num1 1;
  
temp.num2 2;
  
triggerServer("weapon"this.name"calc_math"temp.num1temp.num2);
  
player.chat clientr.num;
}

setTimer(1); 
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote