PHP Code:
//#CLIENTSIDE
function onCreated() {
obj.testfunct();
}
function obj.testfunct() {
player.chat = "hi";
}
This does not work, you can't trigger your own functions onto other objects. However, you can do this and it works just fine:
PHP Code:
//#CLIENTSIDE
function onCreated() {
obj.testfunc();
}
obj.testfunc = function() {
player.chat = "hi";
}
So for further example:
PHP Code:
//#CLIENTSIDE
function onCreated() {
new GuiWindowControl("lalala") {
width = height = 50;
x = y = 50;
profile = GuiBlueWindowProfile;
}
lalala.hi();
}
function lalala.hi() {
player.chat = "hello";
}
This does not work. Neither does this:
PHP Code:
//#CLIENTSIDE
function onCreated() {
new GuiWindowControl("lalala") {
width = height = 50;
x = y = 50;
profile = GuiBlueWindowProfile;
thiso.catchEvent(this, "hi", "LALA123");
}
lalala.hi();
}
function LALA123() {
player.chat = "hello";
}
This doesn't work either:
PHP Code:
//#CLIENTSIDE
function onCreated() {
new GuiWindowControl("lalala") {
width = height = 50;
x = y = 50;
profile = GuiBlueWindowProfile;
this.hi = function() {
player.chat = "hi";
}
}
lalala.hi();
}
However, this works fine:
PHP Code:
//#CLIENTSIDE
function onCreated() {
new GuiWindowControl("lalala") {
width = height = 50;
x = y = 50;
profile = GuiBlueWindowProfile;
}
lalala.hi = function() {
player.chat = "hello";
}
lalala.hi();
}
However, none of these problems occur serverside. So... yeah.
