Bug the way of files

Just starting out? Need help? Post your questions and find answers here.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 269
Joined: Tue Jan 04, 2011 6:21 pm

Bug the way of files

Post by SPH »

salut,

je poste ici car la section bug est fermé sur le forum francais.

De quoi s'agit il ?
Et bien, quand on fait un programme et qu'on l'enregistre dans le meme repertoire qu'un fichier BMP ou MOD (ou autre) et qu'on appelle ce fichier par "fichier.bmp" sans indiquer son chemin en entier (puisqu'il est dans le meme repertoire que notre .pb), cela ne marche pas toujours !!
Je rencontre un bug qui m'empeche de trouver mon BMP ou MOD !!

Avez vous rencontré ce probleme ?? :x
Last edited by SPH on Tue Jul 22, 2014 9:02 pm, edited 1 time in total.
http://HexaScrabble.com/
!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 : 5.73LTS - 32 bits
Fred
Administrator
Administrator
Posts: 16687
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Bug chemins de fichiers

Post by Fred »

No. Just ensures your CurrentDirectory is OK by using "Debug GetCurrentDirectory()". And please post in english here, thank you.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 269
Joined: Tue Jan 04, 2011 6:21 pm

Re: Bug chemins de fichiers

Post by SPH »

Fred wrote:No. Just ensures your CurrentDirectory is OK by using "Debug GetCurrentDirectory()". And please post in english here, thank you.
Mon .PB est dans "f:\PB old\old\demo2014\" et un "Debug GetCurrentDirectory()" indique "d:\" ! :shock:


My .PB is in "f:\PB old\old\demo2014\" and a "Debug GetCurrentDirectory()" say "d:\" ! :shock:
http://HexaScrabble.com/
!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 : 5.73LTS - 32 bits
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Bug chemins de fichiers

Post by Little John »

Fred wrote:please post in english here, thank you.
And please change the French thread title to an English title. Thanks.
SPH wrote:My .PB is in "f:\PB old\old\demo2014\" and a "Debug GetCurrentDirectory()" say "d:\" ! :shock:
Yes, why not?

What do you want to achive?
Maybe

Code: Select all

Debug GetPathPart(ProgramFilename())
is what you are looking for (instead of GetCurrentDirectory())?
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Bug the way of files

Post by Demivec »

Perhaps:

Code: Select all

SetCurrentDirectory(GetPathPart(ProgramFilename())))
Post Reply