So I was playing with some script and came up with this:
PHP Code:
function onCreated() {
temp.obj2.hello = "world";
temp.obj = temp.obj2;
player.chat = temp.obj2.hello;
}
Which output's:
But for some reason this doesn't work. Maybe I am doing it wronge?
PHP Code:
function onCreated() {
temp.obj2 = test();
player.chat = temp.obj2.hello;
}
function test() {
temp.obj.hello = "world";
return temp.obj;
}
Which output's: