View Single Post
  #1  
Old 06-02-2007, 09:03 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Objects. Love/Hate Relationship.

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 (
05i++) {
    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));
    }
  }

__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote