Any ideas why?
When I use pathrequester just before writingpreferences, the file is not created.
Code: Select all
If CertDir$ = ""   
   CertDir$ = PathRequester("Select a Directory for IBCC Certificates:  ","C:\")
EndIf
   Gosub SavePrefs
Code: Select all
If CertDir$ = ""   
   CertDir$ = PathRequester("Select a Directory for IBCC Certificates:  ","C:\")
EndIf
   Gosub SavePrefs
Code: Select all
If CertDir$ = ""    
   CertDir$ = PathRequester("Select a Directory for IBCC Certificates:  ","C:\") 
   CertDir$=CertDir$+"preferences.dat" ;add the file name after the path
EndIf 
   Gosub SavePrefs


Code: Select all
Xdir$ = PathRequester("Enter A File Path","C:\")
SavePrefs:
  spResult = CreatePreferences("Test.ini") : Debug spResult
               PreferenceGroup("TEST SECT")
         WritePreferenceString("Test","Test")
  ClosePreferences()
End
Code: Select all
MyPath$=PathRequester("Choose your Path","c:\")
MyFile$=Test.ini
CompletePath$=Mypath$+MyFile$
MyFileSaver(CompletePath$)
Code: Select all
Xdir$ = PathRequester("Enter A File Path","C:\") 
SavePrefs: 
  spResult = CreatePreferences("Test.ini") : Debug spResult 
               PreferenceGroup("TEST SECT") 
         WritePreferenceString("Test","Test") 
  ClosePreferences() 
End
Code: Select all
Xdir$ = PathRequester("Enter A File Path","C:\") 
SavePrefs: 
  spResult = CreatePreferences(Xdir$+"Test.ini") : Debug spResult 
               PreferenceGroup("TEST SECT") 
         WritePreferenceString("Test","Test") 
  ClosePreferences() 
End


A path is not required for it to save the ini file. So by saying it didn't save anything you are not being specific enough to be a good debugger. When didn't it save anthing? When did it? Why?Fou-Lu wrote:I tryed your test, and as you said, it didn't save anything. Have you tryed my test?
Code: Select all
SavePrefs: 
  spResult = CreatePreferences(Xdir$+"Test.ini") : Debug spResult 
               PreferenceGroup("TEST SECT") 
         WritePreferenceString("Test","Test") 
  ClosePreferences() 
EndCode: Select all
Xdir$ = PathRequester("Enter A File Path","C:") 
SavePrefs: 
  spResult = CreatePreferences(Xdir$+"Test.ini") : Debug spResult 
               PreferenceGroup("TEST SECT") 
         WritePreferenceString("Test","Test") 
  ClosePreferences() 
End
I understood perfecly. You get a path but your file isn't saved there, and it is saved somewhere else just because you used the PathRequester() before, right? Sorry, I was just trying to help you. While there isn't anyone else trying to help, let's keep on trying to solve that? Don't get your hopes on Fred coming here himself to help you. This problem is also on Bugs forum so, you don't have to worry that nobody but me will help you.PB&J Lover wrote:What does this sentence mean to you?
"The Xdir$ is NOT the directory for the 'TEST.ini" file."
