While enjoying my ability to come up with quirky names for threads. I'm having an issue elsewhere with me objects in my mudlib.
Here's the issue:
When I echo all the objects vars through the for loop. It only returns the values/information of the last two vars. This is causing a serious pain in the ass. Becuse no matter what I come up with. It refuses to return the values for all 3 object variables.
However, I know the variables are being written as getDynamicVarNames() returns all three vars. But I'm only getting the values for two.
Here's the script portion:
PHP Code:
public function reflectItems() {
list = ("Control_Mudlib").itemreflectvars;
array.clear();
for (i = 0; i < 5; i++) {
if (files[i] == null) {
break;
}
item = new TStaticVar();
item.loadVars("mud/" @ files[i] @ ".arc");
obj = new TStaticVar();
obj.(@ list[i]) = makevar("item." @ list[i]);
for (var : obj.getDynamicVarNames()) {
echo(obj.(@ var));
}
}
}