View Single Post
  #10  
Old 06-04-2007, 08:56 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You don't have to reference temp variables with temp. just leave that out, it looks better.
PHP Code:
public function saveItems() {
  
temp.file =
  
temp.=
  
temp.path =
  
temp.data 0;
  
  for (
this.items.size() - 1> -1--) {
    if (
this.items[i].archname != null) {
      
data this.items[i].getSaveData();
      
file.(@ "item" data[0]) = {data[1], data[2], data[3], data[4]};
    }
  }
  
path MudControl.containerpath this.conttype "/cont" this.contid ".txt";
  
file.saveVars(path0);

Versus
PHP Code:
public function saveItems() {
  for (
temp.this.items.size() - 1temp.> -1temp.--) {
    if (
this.items[temp.i].archname != null) {
      
temp.data this.items[temp.i].getSaveData();
      
temp.file.(@ "item" temp.data[0]) = {temp.data[1], temp.data[2], temp.data[3], temp.data[4]};
    }
  }
  
temp.path MudControl.containerpath this.conttype "/cont" this.contid ".txt";
  
temp.file.saveVars(temp.path0);

__________________
Reply With Quote