View Single Post
  #16  
Old 09-17-2003, 05:48 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Re: Brief explanations about some new features: (NEW SCRIPT ENGINE)

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;
}

__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote