View Single Post
  #22  
Old 03-30-2007, 11:20 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Inverness View Post
Heres a sample of my coding, I'm extremely picky about the formatting.
PHP Code:
public function loadRefs(obj) {
  
temp.i;
  
temp.e;
  
temp.vars;
  
temp.count;
  
temp.ref;
  
  
vars = obj.getVarNames();
  
count = 0;
  for (
i = 0; i < vars.size(); i ++) {
    if (
obj.(@ vars[i]).type() == 1) {
      if (
this.isRefStr(obj.(@ vars[i]))) {
        
ref = obj.(@ vars[i]);
        
obj.(@ vars[i]) = parseRef(ref);
        
obj.(@ vars[i]).addRef(obj);
        
count ++;
      }
    }
    else if (
obj.(@ vars[i]).type() == 3) {
      for (
e = 0; e < obj.(@ vars[i]).size(); e ++) {
        if (
obj.(@ vars[i])[e].type() == 1) {
          if (
this.isRefStr(obj.(@ vars[i])[e])) {
            
ref = obj.(@ vars[i])[e];
            
obj.(@ vars[i])[e] = parseRef(ref);
            
obj.(@ vars[i])[e].addRef(obj);
            
count ++;
          }
        }
      }
    }
  }
  echo(
format("References Loaded (%s): %s %s", count, obj.mudtype, obj.mudid));
} 
Your styling is practically the same as mine
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote