Blockland Forums > General Discussion
Out of game Server list
Truce:
--- Quote from: Scout31 on November 17, 2010, 07:19:26 PM ---Explain what is wrong.
--- End quote ---
You can't use isFunction like that. It will return false.
Scout31:
--- Quote from: Truce on November 17, 2010, 07:25:03 PM ---You can't use isFunction like that. It will return false.
--- End quote ---
Funny, have you ever looked at the RTB Package? Here is one I found:
--- Code: ---if(isFunction(Parent,"onDNSFailed"))
Parent::onDNSFailed(%this);
--- End code ---
Either RTB is wrong, or you are.
Truce:
--- Quote from: Scout31 on November 17, 2010, 07:27:00 PM ---Funny, have you ever looked at the RTB Package? Here is one I found:
Either RTB is wrong, or you are.
--- End quote ---
Sorry, I hadn't seen your response.
--- Quote ---==>new ScriptObject(ExampleObj);
==>function ExampleObj::two(%this) { echo(2); }
==>ExampleObj.two();
2
==>package one { function ExampleObj::two(%this) { echo(1); if(isFunction(Parent,"two")) Parent::two(%this); } };
==>activatepackage(one);
Activating package: one
==>ExampleObj.two();
1
==>package one { function ExampleObj::two(%this) { echo(1); Parent::two(%this); } };
==>ExampleObj.two();
1
2
--- End quote ---
Scout31:
So the code I got from RTB was a fail. Ephi, you may want to look at that again.
Ephialtes:
--- Quote from: Scout31 on November 17, 2010, 10:46:12 PM ---So the code I got from RTB was a fail. Ephi, you may want to look at that again.
--- End quote ---
That's why you shouldn't be blindly copying people's code then, I guess.
It doesn't matter for RTB because it gets executed before all other add-ons - so this is your problem to solve.