Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 26th Jul 2005 05:01
How can you use a big string?

When I try to make a big string, it says. "string overflow".

So how can I make a string that can hold more than 10 lines of text?

I like DB!
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 26th Jul 2005 07:35
use many strings like this:


You can then save the file, or just print it to the screen.

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
James Morgan
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 26th Jul 2005 08:02
Like above but use arrays:


Hello!
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 26th Jul 2005 10:09
Wow, thanx a lot!

One more thing...when I try to save a string to a file, and I want to save again later, it erases te previous data.

How can I prevent this?

I like DB!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Jul 2005 15:05
Before you write out the new data, load the old data.

Then, write the old data back out with the new data tagged on the end.

Your load data routines will have to be able to handle files with varying sizes, so you might want to write a header value at the start of the file saying how much data has to be read in by your load routine.

TDK
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 28th Jul 2005 03:28
Thank you so much!

I made a quick level editor for my game, so that I could see where I was placing my objects, and then it would save the DB code to a file. But since at the time I didn't understand the two things (which I asked above), I had to make a different file for each object! Now it will be different.

I like DB!

Login to post a reply

Server time is: 2025-05-22 13:29:03
Your offset time is: 2025-05-22 13:29:03