Ok, If any of you know JavaScript ud understand this..
You know how functions() are called like that. Well if you didnt already know this. fuctions can contain objects!!!! Yes its true people.. But this is disabled in Graal I was hoping stefan could ad this...
'
Simple Explanation
NPC Code:
function funcName(argument1,argument2,etc)
{ statements; }
and then
NPC Code:
funcName(value1,value2,ect)
============================
MoreBiggernier Explanation
Ok. Well Function Arguments or Objects are like when you put an argument into a command. For example..
message text;
text is the 1 argument in that commandline
Now Functions are made to take in objects and spit out results...
Example..
NPC Code:
cut_out_token_one(Call me Cool)
And the function
NPC Code:
function cut_out_token_one(message) {
tokenize #o(message); /*Im using #o cuz of strings. in
javaScript strings are set with "" not setstring.*/
for(i=0;i<tokenscount;i++;) {
if (i!=1) {
setstring result,#T(#s(result) #t(i));
}
}
return;
}
So it would return in the string
result
and have the value = Call Cool;
I hope that explains function aguments or objects ^^;
Adn calling then for you information...
A function waits in the wings until it is called onto the stage. You call a function simply by specifying its name followed by a parenthetical list of arguments, if any:
clearPage();
cut_out_token_one(Call me Cool);
Functions which return a result should be called from within an expression:
total=raiseP(2,8);
if (raiseP(tax,2)<100) ...