Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 17, 2017, 23:23   #1
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,449
Donated: $60
Nick is on a distinguished road
Writing files in Windows 10

I have just implemented a new system for storing randarts, by writing a text file into the user directory, but it doesn't seem to be working in Windows 10.

I have tested it in Linux, and macOS, works fine. It is using essentially the same code as for writing the lore file and character dumps, and they both work fine on Windows 10 (and other platforms). When Win 10 tries to write the artifact file, though, it just creates an empty file.

Does this sound familiar to anyone? Any ideas as to what could be going wrong?
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old February 18, 2017, 23:49   #2
Patashu
Swordsman
 
Patashu's Avatar
 
Join Date: Jan 2008
Posts: 493
Patashu is on a distinguished road
Stupid question #1: Are you flushing or closing the file at the appropriate time? If you forget to do it, maybe all OSes but Windows 10 do it for you.
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu
Patashu is offline   Reply With Quote
Old February 19, 2017, 01:18   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,449
Donated: $60
Nick is on a distinguished road
Not at all a stupid question. I suspected something of the sort, and used a different output method in the hope that it would help, and it did. I still don't understand quite why the previous method failed - my knowledge of file handling leaves something to be desired - but it works sufficiently well now so I'm happy.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old February 19, 2017, 03:21   #4
Patashu
Swordsman
 
Patashu's Avatar
 
Join Date: Jan 2008
Posts: 493
Patashu is on a distinguished road
Hooray! I was useful!
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu
Patashu is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows misbehaving in windows (?) Wanderlust Vanilla 4 January 5, 2017 10:58
Pref files relic Vanilla 11 August 9, 2011 20:40
Updating help files fizzix Vanilla 23 August 3, 2010 04:19
delete.me files konijn_ Development 2 December 8, 2009 22:43
Variant writing.. quickstart guide? Also, Hengband variant suggestions? dzhang Variants 34 April 1, 2009 00:45


All times are GMT +1. The time now is 17:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.