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 / Are there any issues with Open To Write and Windows 7?

Author
Message
Rama
12
Years of Service
User Offline
Joined: 4th Feb 2012
Location:
Posted: 4th Feb 2012 08:50
Hello!

My class is currently using DarkBasic to study game design. One of our assignments is a guessing game that has us draw user names and scores from a text file (Open to Read) and then to write updated user name and score information to the same text file (Open to Write). While Open to Read works perfectly I find that Open to Write does not. I tested Open To Write on a windows xp virtual machine and see that it does work. However, Open to Write does not work on my version of Windows 7 which is Home Premium. Are there any issues between Open to Write and Windows 7 Home Premium? If so, how can I resolve them so I can use Open to Write in my guessing game.

Thank you for any response given
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Feb 2012 14:31
You will need to put your file in My Documents, or another accessible folder. Standard Win7 security will not allow you to write to Program Files.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 4th Feb 2012 20:41
Run as admin too... and maybe disable UAC too... and what BatVink says too...

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Feb 2012 00:05
Quote: "Run as admin too... and maybe disable UAC too"


That's ok for testing, but you can't force your users to disable their security to run your software.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 5th Feb 2012 10:53
Thats what I keep worrying about...

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 8th Feb 2012 20:21
Also watch out for this:
if the file already exists then the command Open to write won't work
http://forum.thegamecreators.com/?m=forum_view&t=131280&b=1

Also watch out for this:
http://forum.thegamecreators.com/?m=forum_view&t=192056&b=7

make file followed by open to write (same issue essentially)

Check out IanM's plugins if you go further, but I found this to be my problem. If you post up your code here I'm sure some of us would check it out. (PS hope it's not UAC because, though I hate it, most people have it on...that would pose a huge issue with many games).

GreenDixy
15
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 8th Feb 2012 21:20
what i did isjust right click on my program and set it up to always run as admin then i dont have to turn uac off

======================================
My software never has bugs. It just develops random features.

Login to post a reply

Server time is: 2024-05-09 15:38:50
Your offset time is: 2024-05-09 15:38:50