I feel as if I'm probably missing something asking this, but as anyone here ever made a function to set a new value to an old one?
I was trying to do something like:
NPC 1
PHP Code:
function onCreated() {
core = this;
}
function setValue(oldVal, newVal)
(@ oldVal) = (@ newVal);
NPC 2
PHP Code:
function onCreated() {
this.on = true;
this.on = core.setValue(this.on, (this.on = !this.on));
echo(this.on);
}
Echoes nothing. >_>