Inside3D!
     

saving and loading variables to a text file i/o

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Programming
View previous topic :: View next topic  
Author Message
metalmodman



Joined: 08 Jun 2009
Posts: 17

PostPosted: Mon Jun 08, 2009 5:54 am    Post subject: saving and loading variables to a text file i/o Reply with quote

I'm working on a project for quake3 and I'm stuck I have no idea how to save/load variables to txt. can any one point me to a tutorial that might help me out? thanks
Back to top
View user's profile Send private message
metlslime



Joined: 05 Feb 2008
Posts: 177

PostPosted: Mon Jun 08, 2009 6:35 am    Post subject: Reply with quote

There is already code in the engine to read and write config.cfg; that might be suitable to what you're doing.
Back to top
View user's profile Send private message
metalmodman



Joined: 08 Jun 2009
Posts: 17

PostPosted: Tue Jun 09, 2009 3:27 am    Post subject: Reply with quote

im tryng to make every player log in with a name and password so they can load their custom class. Think this would be alright with server cvars?
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Jun 09, 2009 6:10 am    Post subject: Reply with quote

There's an fopen, a read, a write, and a close builtin/traps.

Ideally you'd have the config saved on the client, and have that transfered to their server of choice, assuming its a CuTF sort of mod. But if its a long-term rpg sort of mod then yeah, needs to be serverside.

just look in cg_syscalls.c or whatever its called for the server. It might give you some ideas.

Or yeah, just use the client's userinfo by setting the cvars to archived.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
metalmodman



Joined: 08 Jun 2009
Posts: 17

PostPosted: Tue Jun 09, 2009 7:06 am    Post subject: Reply with quote

ah perfect thanks yeah its a rpg mod.

Last edited by metalmodman on Thu Jun 25, 2009 2:55 am; edited 2 times in total
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Programming All times are GMT
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


Powered by phpBB © 2004 phpBB Group