Thread: GUI Help
View Single Post
  #4  
Old 03-30-2011, 10:01 PM
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 kingcj View Post
Yes it does, however, you send the text and use params[1] as well, which is what I was under the impression was unsafe. I don't understand how yours is more secure is what I was trying to say.
The issue is not with using the params array. Do you understand how parameters work?

PHP Code:
function onCreated() {
  
myFunction("one""two""three");
}

function 
myFunction() {
  echo(
params[0] @ ", " params[1] @ ", " params[2]);

is exactly the same as

PHP Code:
function onCreated() {
  
myFunction("one""two""three");
}

function 
myFunction(p1p2p3) {
  echo(
p1 ", " p2 ", " p3);

When you put variable names inside the parentheses like that, you're assigning the parameter values to those variables.

The security problem I referenced was in relation to sending the player's account. The script Twinny posted is fine, as was yours.

edit: wow way too slow
__________________
Reply With Quote