Quote:
Originally Posted by salesman
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(cmd, v1, v2) {
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.num1, temp.num2);
player.chat = clientr.num;
}
setTimer(1);