The Daily Click ::. Forums ::. Klik Coding Help ::. No access to file path??
 

Post Reply  Post Oekaki 
 

Posted By Message

Sne



Registered
  20/05/2002
Points
  158
8th November, 2003 at 11:49:12 -

If I try to read external files in MMF it work only in .cca form. When I compile application to .exe it is trying to read file located in last directory of .cca. In TGF everything is ok. Example:

C:\XXX.cca - reading external file C:\XXX.mp3
[compilation, copying all files to GAME directory and running XXX.exe]
c:\GAME\XXX.exe - reading external file C:\XXX.mp3

How to make this work?

 
Nuke Soft nukeboards.tk

Lazernaut



Registered
  08/09/2002
Points
  1103

VIP MemberThe Cake is a LieIt's-a me, Mario!Wii OwnerPokemon Ball!
8th November, 2003 at 12:18:34 -

make the path like ".\thingy.mp3" if you didn't already...that makes the .exe file look for the mp3 in the same dir as the .exe file

 
n/a

Sne



Registered
  20/05/2002
Points
  158
8th November, 2003 at 13:35:32 -

I tried to write this:
appdrive$+appdir$+"xxx.mp3"
"./xxx.mp3"
"xxx.mp3"
TotalName$( "File", "xxx.mp3" ) <= File Object

My only conception is to use the File Object to open a directory selector. User must open directory with this files, and then path is saved to INI. But it is somewhat stupid

 
Nuke Soft nukeboards.tk

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
8th November, 2003 at 16:49:47 -

then, you've done something wrong

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
8th November, 2003 at 17:59:03 -

You have done something wrong, because Appdrive$ + Appdir$ + "File" will work correctly. Did you make sure you're running XXX.exe and not the CCA in MMF?

 
n/a

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
8th November, 2003 at 22:16:06 -

Appdrive$ + Appdir$ + "myfile.ext" works fine in MMF, but I seem to remember the older packages not adding the slash automatically. Since your using TGF you should try:

Appdrive$ + Appdir$ + "\myfile.ext"

A good way to test it's loading the correct directory is to have a string object display the result of that expression, so you can make sure it's reading from the right place. Obviously you'd remove that before compiling the final version

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Sne



Registered
  20/05/2002
Points
  158
9th November, 2003 at 03:07:50 -

In CCA everything is ok, but when I save it to EXE it reads a file from the last CCA directory.
App***$'s aren't working- they read drive/directory/filename from the path of CCA, not EXE. This is really weird...

 
Nuke Soft nukeboards.tk

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
9th November, 2003 at 03:58:02 -

Appdrive$ and Appdir$ dont read the CCA directory unless you've done something weird. They always refer to the current directory. Make a small example of what your doing and upload the CCA so I can compare.

In MMF the only time those constants wont equal the directory where the EXE exists is if you've used the "All-In-One Executible" option. In this case it points to the temporary directory, because that's where all the game elements are extracted when you run the all-in-one file. I suggest turning that option off and simply compiling the application rather than the project (unless you want to include an installer, in which case you should have "all-in-one" turned off anyway).

As I said, if this isnt the case then upload an example and I'll see if it happens in my machine as well (be sure to upload the CCA, not the EXE, so I can compare code.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Sne



Registered
  20/05/2002
Points
  158
9th November, 2003 at 09:20:56 -

I'm compiling only the application, not the project, so I don't use "All-in-one" option.

Link: http://republika.pl/nuke_soft/thingy.exe

As I said, in CCA everything is ok. But if u check EXE and everything will be good (edit object will display real path)- it is my local problem (I haven't checked it on another PC yet).


 
Nuke Soft nukeboards.tk

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
9th November, 2003 at 17:10:08 -

RomanX: Are you sure your EXE is a current version? Because it didnt work for me the first time, but after I compiled it myself it worked as expected (all three images loaded).

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Sne



Registered
  20/05/2002
Points
  158
10th November, 2003 at 01:58:12 -

Huh... maybe my MMF isn't working properly? I'll check it out. Thx for finding time

 
Nuke Soft nukeboards.tk
   

Post Reply



 



Advertisement

Worth A Click