View Single Post
  #4  
Old 05-18-2013, 08:41 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
You can't send objects, though (you can serialize them first if you must).
I.e.

PHP Code:
function onActionServerSide() {
  if (
params[0] == "data") {
    
temp.obj.loadvarsfromarray(params[1]);
    echo(
"hello" SPC temp.obj.hello); // echos "hello world"
  
}
}

//#CLIENTSIDE

function onCreated() {
  
temp.data.hello "world";
  
triggerserver("gui"this.name"data"temp.data.savevarstoarray(false));

Also OP is missing the second parameter in savelines. I.e.

PHP Code:
temp.lines = {
 
"a",
 
"b",
 
"c"
};
temp.lines.savelines("path/to/file.txt"0); // 0 for overwrite, 1 for append 
__________________
Quote:

Last edited by fowlplay4; 05-18-2013 at 09:30 PM..
Reply With Quote