Quote:
Originally Posted by cbk1994
Parameters are passed to a function.
PHP Code:
function onCreated() {
this.myFunction("bob", "hello there");
}
function myFunction() {
player.chat = params[0] @ " says " @ params[1];
}
params is an array that you can use to see what data was given to the function. This makes it possible to use functions for many things.
Instead of using the params array, you should usually assign parameters a name, like so:
PHP Code:
function myFunction(person, msg) {
player.chat = person @ " says " @ msg;
}
|
This is helpful, thanks chris

Im going to see what I can do, hopefully I complete my misson of creating this!