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.

Newcomers DBPro Corner / help with saving

Author
Message
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 11th May 2004 04:59
alright i attached my entire game so far...
and it wont work
i am having trouble saving, while i use the creation of a txt doc. to save variables, but it says there is a "Runtime warning at line 147. File already exists." but i dont know what this means.
WHY WONT IT WORK???!!!!
~well if you wont to help me get over this depression, please reply "

"geez, its probable a noobish mistake too!"
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 11th May 2004 05:16 Edited at: 11th May 2004 05:16
We wrote our Plugin to bypass dbp file system altogether. Easily read and write files without all sorts of useless code.

You can get our free plugin below


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 11th May 2004 05:19

okay...
what if im not using dbp?

"geez, its probable a noobish mistake too!"
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 11th May 2004 05:20
and i realize the typo in my signature, and now it is fixed

"geez, its probably a noobish mistake too!"
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 11th May 2004 05:23
You need to delete the file if it exists before you open it for writing.

save:
if file exist("savegame.txt") then delete file "savegame.txt"
open to write 1, "savegame.txt"
write string 1,str$(x#)
write string 1,str$(y#)
write string 1,str$(z#)
close file 1

i won't see you in the pit
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 11th May 2004 05:46
alrightee then?
um
well now when it saves it works...
but when it loads it starts then it says
"Runtime error at line 104. Image does not exist."
question: am i being dumb and missing the obvious, our is it a noobish mistake, or did i just not know something?

but thanks to the_winch, for you got me to the next step!

"geez, its probably a noobish mistake too!"
Kivu_Rako
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 11th May 2004 17:07
alright everybody.
with a little bit of the_winch's help, i have completely fixed the program. thanks again
~outz

"geez, its probably a noobish mistake too!"

Login to post a reply

Server time is: 2024-09-22 08:43:57
Your offset time is: 2024-09-22 08:43:57