Is everyone on this forum incapable of actually reading my post.
Note 1: My script works
PERFECTLY when the commented-out lines are edited in.
Note 2; I stated this several times.
I only want
ONE question answered. Why do the commented-out lines make the difference in which this script works and doesn't work?
Quote:
Originally Posted by xAndrewx
HTML Code:
//Loading all the possible var names...
vars = file.getVarNames();
//However, you're only wanting to remove this
vars.remove("mudid");
//Shouldn't it be
vars.remove(this.muditems[0].mudid);
|
No, vars is a list of the names of the variables that will be copied,
mudid is the name of a variable I don't want copied. Stop trying to fix whats not broken and READ MY POST.
Quote:
Originally Posted by xAndrewx
HTML Code:
//You're removing vars, then you're trying to assign a new var...
vars.remove("mudid");
vars.remove("mudtype");
for (i = 0; i < vars.size(); i ++) {
this.(@ vars[i]) = file.(@ vars[i]);
}
|
I'm removing the NAMES of vars that would break the mud object considering these are 'read-only' vars and should never be changed. If their name is not in the list, they will not be copied.
mudid and
mudtype are both assigned by the
newObject() function in the MudControl. Once again, this is NOT the problem, READ MY POST.
Quote:
Originally Posted by xAndrewx
HTML Code:
for (temp.currentVar: vars) {
this.(@ temp.currentVar) = makevar(file.( @ temp.currentVar));
}
If all else fails, make sure your way of setting the ''new vars'' actually works, try echoing the vars after you've added them. [Don't do the file. stuff, make it all one string being "hello"]
HTML Code:
for (temp.currentVar: vars) {
this.(@ temp.currentVar) = randomstring("hello", "hi", "yo");
}
echo(this.getVarNames());
|
Why are you trying to fix something that isn't broken?