Quote:
Originally posted by Python523
The new features
|
Mh, i really need to read the functions stuff more careful because variable passing is a bit unclear to me. Or i think XD does it work like this:
NPC Code:
if (playerenters){
a=10;
b=10;
c=7;
multiply_em(a,b,c);
}
function multiply_em(d,e,f){
g=d*e;
h=g*f;
message #v(h);
}
//very simple, lol.
i should get as outcome (10*10)*7 (=700), right...?
Also, can we do this:
Is there a way to use a "message" that uses a function? I mean like this (Javscript):
NPC Code:
alert("You have" + getcash(client.taxreturn,client.salary) "dollars!);
function getcash(x,y){
this.cash=x*y;
return this.cash;
}