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.

AppGameKit Classic Chat / a file browsing problem on windows devices

Author
Message
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 24th Aug 2018 23:47 Edited at: 24th Aug 2018 23:55
using windows...
(a file browsing problem)

I could be doing it wrong but when i try to open a drive that has the media not loaded or inserted the program crashes with a message
(Uncaught exception: Failed to open file for writting D:/window_position.dat)

Dir$="d:\" <-this drive letter was found using CountWindowsDrives() and getting it from GetWindowsDrive(x)
SetRawWritePath( dir$)
id=OpenRawFolder(dir$)

<crashes here

is there a way to find out if a disc or sd card is loaded into the drive slot before trying to search for files and folders on a found drive? it crashes if nothing is found in the drive.

edit: i also want to mention that window_position.dat is an auto generated file from using agk..... nowhere in my program am i trying to write or access this file.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Aug 2018 15:37
i want to use the appgamekit commands to do the job.

i guess i can hide the error using SetErrorMode(0)

but i dont think agk should be littering every writepath folder change with window_position.dat

@paul can this be fixed?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Aug 2018 11:14 Edited at: 29th Aug 2018 11:16
SetRawWritePath has been deprecated because of this reason, the preferred method is now to use OpenRawFolder or to use file paths prefixed with "raw:" e.g.
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 1st Sep 2018 19:58
ok thanks paul.

Login to post a reply

Server time is: 2024-04-19 12:07:40
Your offset time is: 2024-04-19 12:07:40