Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
needing_help
12
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 29th Nov 2013 03:53
I am building a hangman game and have a unique sound for each letter guessed, right or wrong. Then, there is a wav file for the winning screen and a different one for the losing screen. All files are wav. The problem is that when the game is either won or lost and it's suppose to play again, I get an error message. The game shows the new screen then, when I enter a letter--correct or incorrect--, I get this error message. Sometimes, it will let me play a letter or two before giving the error message.

The error is" Runtime error 3003-Sound already exists at line...."

Any help greatly appreciated. Thanks!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2013 15:48 Edited at: 29th Nov 2013 17:41
The error probably means exactly what it says. If you're loading the sounds every time you play the game then you'll get that message. You should probably be loading your media BEFORE the main game loops so they get loaded just once.

Can't be more specific without seeing your code.



Powered by Free Banners
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 29th Nov 2013 17:20
Quote: "The error is" Runtime error 3003-Sound already exists at line....""


Sounds like you're trying to load a sound number that already has a sound loaded for it... If you've already loaded sound 2, for example, you cant use LOAD SOUND with that number again unless you DELETE SOUND 2.

D.D.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2013 17:41
Yes, that's another possibility.



Powered by Free Banners
needing_help
12
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 29th Nov 2013 18:17
I've included parts of the program below. Please let me know if you need more info.



I tried to put delete sound but it didn't work. I probably didn't have it at the right place. I would greatly appreciate any help today as it has to be completed today. This is extra credit and the teacher knows I'm seeking help on this forum.
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 29th Nov 2013 18:27
Quote: "Yes, that's another possibility. "

Isn't it in fact the very same issue, just two "would-seem" different ways of arriving there?


"Why do programmers get Halloween and Christmas mixed up?"
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2013 19:59
Yes, and in your own words there are two possibilities.

Quote: "just two "would-seem" different ways of arriving there?"


I was referring to the second - or the first depending on your point of view.



Powered by Free Banners
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2013 20:07
@needing_help

You should spend a few minutes reading what we say and then studying your code. It gets annoying when it seems people just want the answer instead of working it out for themselves.

Look at what I told you before and then study your code carefully. Then think about what you are doing.

At the beginning of your code you have this:



Then at the end of the game you have this:



Now where exactly do you think that takes you in your code and what do you think happens? Two people have told you what to look for or what to do.



Powered by Free Banners
needing_help
12
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 30th Nov 2013 02:38
I do appreciate the help and I emailed you separately to let you know that I figured it out. However, please understand that some people think in a logical, linear manner and this comes very easy to them. People such as yourself. I, however, have a great deal of trouble understanding the basics of this stuff and I'm only trying because it's a requirement in my courses. I'm not trying to take advantage of anyone offering help; I just don't understand. Often, I don't understand the directions I get from others. Again, extremely new and confused by this stuff.

I have seen other students trying to get people to give them the answers on here. Sure, that would be nice and easy but it's not what I'm trying to do. I've spent hours and hours trying to figure out these things before posting on this forum. I've taken the advice I've gotten here and have been able to fix some problems. The things I'm trying to figure out are for extra credit so I'm trying to learn; I don't need these points but I'm working hard to earn them. If it annoys you to answer questions, then don't answer them. Otherwise, please try to remember that this is a forum to ask questions and get answers. Please don't assume that additional questions mean laziness; it might just mean lack of understanding and skill.
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 30th Nov 2013 11:12
Stop using goto's before the things go ugly, it' a poor practice.I recommend using gosub's they are good for readability if you know how to use them properly.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Nov 2013 12:51
Quote: "I emailed you separately to let you know that I figured it out"


Glad you got it sorted - but I haven't received your email and I've checked my spam folders just in case.

Quote: "However, please understand that some people think in a logical, linear manner and this comes very easy to them."


Yes, I'm afraid I expect that of everyone here and my patience wears a bit thin sometimes. I probably shouldn't let it show.



Powered by Free Banners
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 30th Nov 2013 19:21
Quote: "Stop using goto's before the things go ugly, it' a poor practice"

This! This! This! This! This! This! This! This! This! This! This!

needing_help
12
Years of Service
User Offline
Joined: 18th Nov 2013
Location: Colorado
Posted: 30th Nov 2013 21:57
I don't know what a gosub is. We were taught and told to use the goto for this program.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Dec 2013 13:39
Don't worry. Most of us avoid goto because it can lead to tangled logic but it wasn't your problem. Your code would probably have worked fine if you'd done this at the start of your program:



That way you only load the sound and image once before your main game starts - but I guess you've figured that out already.



Powered by Free Banners
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Dec 2013 13:36
@needing_help

I've found your messages. You'd sent them to me using the new TGC Forum message system which I hadn't used before. I assumed you were using standard email.

So now I know how to use the new message system.

I prefer the old email button though.



Powered by Free Banners

Login to post a reply

Server time is: 2026-07-06 10:36:33
Your offset time is: 2026-07-06 10:36:33