TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Writing Variables to a file

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
vision



Joined: 01 Feb 2014
Posts: 32

PostPosted: Wed May 27, 2015 7:04 am    Post subject: Writing Variables to a file Reply with quote

Is there way to write variables for a specific class to a file or to target specific variables to write? #class X write does not appear to write the variables.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed May 27, 2015 6:08 pm    Post subject: Reply with quote

The only way is to place the variables you want to store in their own class.
Back to top
View user's profile Send private message Send e-mail
vision



Joined: 01 Feb 2014
Posts: 32

PostPosted: Sun May 31, 2015 2:47 pm    Post subject: Saving class variables Reply with quote

I tried that and it creates a blank file with class open at the top and class close at the bottom, it appears it only pulls in actions and aliases on write.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun May 31, 2015 5:53 pm    Post subject: Reply with quote

Works for me

Code:

#class var open
#CLASS {var} HAS BEEN OPENED.
#var x y
#OK. VARIABLE {x} HAS BEEN SET TO {y}.
#var y z
#OK. VARIABLE {y} HAS BEEN SET TO {z}.
#class var close
#CLASS {var} HAS BEEN CLOSED.
#class var write test.tin
#CLASS {var} HAS BEEN WRITTEN TO FILE.
#sys cat test.tin
#OK: EXECUTING 'cat test.tin'
#CLASS {var} OPEN

#VARIABLE         {x}  {y}
#VARIABLE         {y}  {z}

#CLASS {var} CLOSE
Back to top
View user's profile Send private message Send e-mail
vision



Joined: 01 Feb 2014
Posts: 32

PostPosted: Sat Jun 13, 2015 11:05 pm    Post subject: Worked Reply with quote

Thanks I was closing the class. Appreciate the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group