Thread: Savevars
View Single Post
  #1  
Old 02-23-2007, 09:12 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Savevars

Having a little problem. It doesn't seem to want to store the data. It's creating the file, just isn't storing it I suppose. Any suggestions?
HTML Code:
  this.itemName = "Red Apple";
  this.increasehp = 0.5;
  this.cureEffect = {{"poison"}, {70}};

  temp.newData = new TStaticVar();
  temp.allFlags = getstringkeys("this.");
  for (temp.currentFlag: temp.allFlags)
  {
    if (temp.currentFlag.starts("item"))
    {
      temp.newString @= temp.currentFlag @ "=" @ makevar("this." @ temp.currentFlag) @ ",";
    }
    makevar(temp.("newData." @ temp.currentFlag)) = makevar("this." @ temp.currentFlag); 
  }
  temp.fileName = this.itemName @ ".arc";
  temp.fileLocation = "archetypes/" @ this.itemCatagory @ "/";
  
  temp.newData.savevars(temp.fileLocation @ temp.fileName, 0);
Any suggestions?
Reply With Quote