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

Any reason why it isn't storing the array correctly? it should just save the "temp.newData" part as an array, however it refuses to do so! Any suggestions?
HTML Code:
function onCreated()
  {
  this.itemName = "Black Sword";
  this.itemDescription = "This great sword, once held by the almighty Chandler!";
  this.itemImage = "block.png";
  this.itemPrice = 300000;

  this.weaponName = "+Sword";
  this.causeEffect = {{"Poison", "Ice", "Fire"}, {100, 75, 75}};  
  
  for (temp.itemData: getstringkeys("this."))
    temp.itemData.add(temp.itemData @"="@ makevar(@"this."@ temp.itemData));
  
  temp.newData = new TGraalVar();
  makevar(@"temp.newData.item-"@ this.itemName) = temp.itemData;
  temp.newData.savevars("itemData/newItem.arc", 0);   
   
  }
Reply With Quote