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 / 2 Problems: DB created EXE files destroy IO files

Author
Message
DarkBasic Newb
15
Years of Service
User Offline
Joined: 9th Dec 2008
Location:
Posted: 10th Dec 2008 05:22 Edited at: 17th Dec 2008 07:02
Two Problems:
#1 I've created a game that does simple IO file storage for a high score table.

Through DB this code runs smoothly, no problems.
After I create a final exe, this program destroys all data files that the program accesses. How can I fix this?

#2 After creating a final .exe file, some of the text displayed to the screen has a hologram effect...it duplicates itself. If this text has an increased font size, it prints the normal font text, along with a hologram type large font size on top of it. How can I fix these issues?

*Note* Program runs smoothly through the DB editor. Problems occur after creating a final .exe file.
Can you help?

Here's where I write my score table:

if file exist("score.dat")
if file exist("backup_score.dat") then delete file "backup_score.dat"
rename file "score.dat","backup_score.dat"
endif

REM Deleting Old Score Table to Write the Current One
if file exist("score.dat") then delete file "score.dat"

REM WRITING HIGHSCORE TABLE
open to write 1,"score.dat"

for y=0 to 3
for x=0 to 29
write string 1,Score$(y,x)
write long 1,Score(y,x)
next x
next y

write long 1,Backup_Store
close file 1
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Dec 2008 10:29
We would need to see some code snippets to understand the problem and help you. We also need to know what you mean by destroying files - deleting? corrupting?

DarkBasic Newb
15
Years of Service
User Offline
Joined: 9th Dec 2008
Location:
Posted: 17th Dec 2008 07:03
if file exist("score.dat")
if file exist("backup_score.dat") then delete file "backup_score.dat"
rename file "score.dat","backup_score.dat"
endif


REM Deleting Old Score Table to Write the Current One
if file exist("score.dat") then delete file "score.dat"

REM WRITING HIGHSCORE TABLE
open to write 1,"score.dat"

for y=0 to 3
for x=0 to 29
write string 1,ScoreJediName$(y,x)
write long 1,ScoreJediScore(y,x)
next x
next y

write long 1,Backup_Store
close file 1

Login to post a reply

Server time is: 2024-09-27 22:22:37
Your offset time is: 2024-09-27 22:22:37