Sign in to follow this  
Twinsen LBA

Help Please

Recommended Posts

Twinsen LBA    124
I have made a small game and uploaded it onto my website fine. And people have been able to download it no problems. But i uploaded a new version and people havnt' been able to download it, this message comes up ;- "cannot find the specified file. make sure the path and filename are correct" Any ideas folks. Other info - i have written it in C++ , borland compiler. The latest changes i made was to add sound effects. The program STILL runs on my PC, even if i download it from the website. I have tryed to comment out all of the recent changes i made and still no luck.

Share this post


Link to post
Share on other sites
gharen2    520
None of those changes you made will have any effect on people's ability to download it from the website.

Clearly you uploaded it to the wrong location: hence the very clear error message it gives stating exactly that.

Share this post


Link to post
Share on other sites
smitty1276    560
What is the path to the file on your server? What is the path to the file in the download link?

How is it that you were able to figure out how to write a game in C++, etc., but don't understand file paths?

Share this post


Link to post
Share on other sites
Twinsen LBA    124
umm because im not sure how, I would be really grateful if someone could spell it out for me please.

At the moment someone clicks on the button link which is linked to a file which then downloads the program.

any help



Share this post


Link to post
Share on other sites
Cambo_frog    855
Quote:
Original post by Twinsen LBA
umm because im not sure how, I would be really grateful if someone could spell it out for me please.

At the moment someone clicks on the button link which is linked to a file which then downloads the program.

any help


Just give us a link to the page that contains the "button link" and we can look at the source html and possibly determine the problem.

Share this post


Link to post
Share on other sites
Cambo_frog    855
Quote:
Original post by Twinsen LBA
okey dokes.

http://www.viperdream.com/#/programmes/4530352911

Its the ball shot game.

Thanks


BallShot.exe downloads fine from that link. I haven't tried to run it yet though.

Edit: when I try and run the .exe it displays a messagebox stating "Cannot find the specified file. Make sure the path and filename are correct".

what exactly is this .exe trying to do?

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Twinsen LBA
yeah it wont run


Quote:
Original post by Twinsen LBA
But i uploaded a new version and people havnt' been able to download it


Precise questions are required for precise answers.

It seems like people are downloading it fine, but it won't run on other computers because other computers don't have certain files in the same places as they are on your computer. What files is the game expecting to be there? Are you sure you're aware of the full list?

Share this post


Link to post
Share on other sites
smitty1276    560
Quote:
Original post by Twinsen LBA
yeah it wont run


Then why did you tell us that the problem was that you couldn't download the game? Why don't you start over... what exactly is the real problem?

Share this post


Link to post
Share on other sites
kiwibonga    183
The compiler won't put the sound files in the exe for you; you have to bundle them with the program (in a zip file, for instance), making sure to use the same paths as in your build environment.

Share this post


Link to post
Share on other sites
Twinsen LBA    124
Quote:
Original post by kiwibonga
The compiler won't put the sound files in the exe for you; you have to bundle them with the program (in a zip file, for instance), making sure to use the same paths as in your build environment.


Ok great.

So how do i do that please.

Share this post


Link to post
Share on other sites
Cambo_frog    855
Quote:
Original post by Twinsen LBA
yeah it wont run


See my edit to my last post.

Ballshot.exe actually runs but displays a messagebox stating "Cannot find the specified file. Make sure the path and filename are correct".

Does your BallShot depend on other ( media ? )files that it may be trying to load?

Edit: Too slow, previous responders have asked the pertinent questions.

Share this post


Link to post
Share on other sites
Twinsen LBA    124
Quote:
Original post by Cambo_frog
Quote:
Original post by Twinsen LBA
yeah it wont run


See my edit to my last post.

Ballshot.exe actually runs but displays a messagebox stating "Cannot find the specified file. Make sure the path and filename are correct".

Does your BallShot depend on other ( media ? )files that it may be trying to load?



Yes thats when the problem started when i added in "wav" sample clips for the ball being shot and so on.

Share this post


Link to post
Share on other sites
kiwibonga    183
Quote:
Original post by Twinsen LBA
Quote:
Original post by kiwibonga
The compiler won't put the sound files in the exe for you; you have to bundle them with the program (in a zip file, for instance), making sure to use the same paths as in your build environment.


Ok great.

So how do i do that please.


Get a program like 7zip or winzip or winrar that can create .zip archives, install it, then it'll add options to the menu you get when you right click a file. Select the entire contents of the folder where your game and sound files are located, and right click, then select the option to add the files to an archive that the program added.

Since the program works for you but not others, I think your problem is that you're using absolute paths (like C:\somefolder\sound.wav) instead of relative paths (like soundfolder\sound.wav, where "soundfolder" is a subfolder in the folder where your game is located).

So change your code so it doesn't use drive letters and only tries to access files that are in a subfolder of the game's main folder (or in the same folder as the exe). That should solve the problem.

EDIT: By the way, it would be so much simpler for us to help you if you just posted your code...

Share this post


Link to post
Share on other sites
Cambo_frog    855
Quote:
Original post by Twinsen LBA
Quote:
Original post by Cambo_frog
Quote:
Original post by Twinsen LBA
yeah it wont run


See my edit to my last post.

Ballshot.exe actually runs but displays a messagebox stating "Cannot find the specified file. Make sure the path and filename are correct".

Does your BallShot depend on other ( media ? )files that it may be trying to load?



Yes thats when the problem started when i added in "wav" sample clips for the ball being shot and so on.


Yea see kiwibonga and Zahlmans responses.

Alternativly include the wavs as resources in your exe.

Share this post


Link to post
Share on other sites
Twinsen LBA    124
Firstly thank you all for the responses. I think im getting there.

Why has someone rated me bad???

Iv come on to ask a question, whats the point in this forum then?

Share this post


Link to post
Share on other sites
Nypyren    12074
I highly recommend NOT putting the wavs inside the EXE. That's not really a beginner's approach and I could imagine things going horribly wrong.

Go with a .zip or .7z file.

Share this post


Link to post
Share on other sites
Cambo_frog    855
Quote:
Original post by Twinsen LBA


Alternativly include the wavs as resources in your exe.

Is that the easiest way? if so how do i do that?


Not sure how to do it using the Borland compiler/IDE.

I used it in many years past, and I can't remember if it uses standard resource files like visual studio. You may be better asking on a Borland newsgroup unless any other members here know otherwise.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this