Quote:
Originally Posted by Astram
Just replace thiso with this, on ALL of the scripts above?
|
No, only in the sections where you try to set GUI text to "this." values.
Reason: this. when used in the scope of another object refers to that object, so you have to get the values from the origin "thiso." object.
If you look at the output you'll see what's going on.
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.example = "Hello World!";
new GuiWindowCtrl("Example") {
x = 0;
y = 0;
width = height = 200;
// Check F2 Logs for Output
echo("this.name: " @ this.name @ " this.example: " @ this.example);
echo("thiso.name: " @ thiso.name @ " thiso.example: " @ thiso.example);
text = thiso.example;
}
}