forums

TNT Basic Forums > Beyond Basic
Saving Files
< Last Thread     Next Thread >
Author
Thread        Post A Reply

11-28-2005 12:45

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

Saving files is one of the most thing I need improved. I want to be able to save a thousand sprite positions easily:

For i2=0 to 999
Save(spritePositions, x[i2], i2)
Save(spritePositions, y[i2], i2+1000)
Next


And recalling the variables...

For i2=0 to 999
x[i2]=Read(spritePositions,i2)
y[i2]=Read(spritePositions, i2+1000)
Next


Save (file, variable, where)
Where file is the file to save it in, variable is what to save, and where is where in the list to save it.

Opening files would just be reading them:

variable=Read (file, where)

Without having to open and close files or set the file position.

12-23-2005 17:58

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

Mark...

Can you make a early update for TNT on this subject?
Just make it save the file position in TNT's source code.

Thank you,
Jacob

12-26-2005 17:35

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

If you make the type text then it does what I want it to! It's fine how it is, because the file position is the line number in the text file.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.