View Single Post
  #26  
Old 02-24-2011, 02:31 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Astram View Post
Idk how to use params.. 0.0 sorry im kind of a >>><<< at scripting...
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(personmsg) {
  
player.chat person " says " msg;

__________________
Reply With Quote