directory not initialized

Just starting out? Need help? Post your questions and find answers here.
artnat
User
User
Posts: 12
Joined: Sun Nov 10, 2024 3:34 pm

directory not initialized

Post by artnat »

I show a code snippet, that does not work:

Image

stvz is a global string with a valid directory name, as shown by debug. #stvz is -1.

The program crashes in line 212 with the message: The specified #Directory is not initialized. I Have no idea, what is wrong.
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: directory not initialized

Post by Kiffi »

It is better if you post the code snippet here.
Hygge
User avatar
SPH
Enthusiast
Enthusiast
Posts: 561
Joined: Tue Jan 04, 2011 6:21 pm

Re: directory not initialized

Post by SPH »

@artnat:
We want to see your code. It's better than an image that doesn't display anyway...

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
Axolotl
Enthusiast
Enthusiast
Posts: 798
Joined: Wed Dec 31, 2008 3:36 pm

Re: directory not initialized

Post by Axolotl »

artnat wrote: Sun Nov 10, 2024 3:48 pm stvz is a global string with a valid directory name, as shown by debug. #stvz is -1.
I am not sure that it is a valid dir. I know -1 as the return value of FileSize() for missing file. A valid dir returns -2,
I third the code request.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply