Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 02-23-2007, 09:14 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
Have you given the rw rights to (npcserver)?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 02-23-2007, 09:15 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Have you given the rw rights to (npcserver)?
Should do, it's creating the file.
Reply With Quote
  #4  
Old 02-23-2007, 09:23 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
Try echoing temp.newData.getDynamicVarNames() right before it saves it and see what it outputs?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 02-23-2007, 09:40 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Try echoing temp.newData.getDynamicVarNames() right before it saves it and see what it outputs?
Weird, it's not producing anything. How bizarre

HTML Code:
makevar(temp.("newData." @ temp.currentFlag)) = makevar("this." @ temp.currentFlag); 
HTML Code:
temp.newData.( @ temp.currentFlag) = makevar("this." @ temp.currentFlag); 
Works, how weird.

Last edited by Chandler; 02-23-2007 at 09:53 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.