Help Please

Started by
25 comments, last by Cambo_frog 15 years, 8 months ago
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?
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.
Advertisement
yeah it wont run
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?
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?
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.
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.
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.
For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.
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.
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...
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.

For the love of god, please tell me that you've just omitted your error checking code for brevity, and you don't really assume that all those functions succeed.

This topic is closed to new replies.

Advertisement