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.

Newcomers DBPro Corner / Hangman Game

Author
Message
SlashX1896
13
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 2nd May 2011 20:43
Still trying to make my hangman game. I got most of it done, my only problem seems to be i am not quite sure how to make it so when
guess (guess inputted by user)
does not equal
itemletters(c) ( the individual letters from the word (gitem))

for it to add + 1 to a variable called error every time the word is wrong, and once error = 6 run a you lose script.
and when error = 1 run head() function when error = 2 run body() function, and so on and so forth. many thigns i have tried just result in errors and im out of ideas.

thanks.
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 2nd May 2011 21:39
Hi again. In future, if you could give us more of your code, we can try and fix it for you. For now, try something like this:



Hopefully this should give you some idea of how you might go about achieving what you want. If not, just post with more details of what's going wrong. Good luck!
SlashX1896
13
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 3rd May 2011 00:08


Here is all my code. It is quite messy as i am new to programming but trying my best, unfortunately this is all due for me in a few hours so hopefully I can get this done before then.
I tried what you said and it worked for 1 error being the head, but after two errors it does not do anything else, not quite sure what i am missing.
SlashX1896
13
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 3rd May 2011 00:42
To add on to my previous post, i tried adding the repeat untill function

in which it fixed the errors, but then when letters were guessed correctly it no longer puts them in the correct spaces, where before it did.
SlashX1896
13
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 3rd May 2011 02:34
Posting (again) saying thanks for the help, but the new member feature of having to wait many hours for my post to be approved prolonged me of getting any further help and now it is too late as i have to turn everything in , in about 20 minutes.

I won't be using darkbasic anymore but anywho thanks for all the help lucas, still managed to fix my problems =]
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 3rd May 2011 15:46
Quote: "new member feature of having to wait many hours for my post to be approved prolonged me of getting any further help and now it is too late as i have to turn everything in , in about 20 minutes."

Yeah, it is annoying but I guess it helps keep down the span. I saw a while back there were new posts here but I couldn't view them so sorry I couldn't have a look at this.

Quote: "I won't be using darkbasic anymore"

I'm sorry to hear that. If it's the forum problem that worries you, you must be a fair way to being out of the new user zone having posted a fair few times on this thread. Anyhow I hope your assignment went OK and if you do come back to DBP, we'll still be around to try and help. Regards.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 3rd May 2011 16:47 Edited at: 3rd May 2011 16:54
Not to sound harsh but why is it Darkbasic Pros or the post approvals fault? Your posts were a little under 6 hours apart. If this was for homework you usually get at least a full day or more to do it in... not 6 hours. It's not anybodies fault but yours because you waited till the last second to do your homework. And besides you should of learned enough in class to do it yourself. It's also not anybodies fault but yours that you weren't paying enough attention to do it without help from Lucas. With that kind of attitude and logic I don't think programming is for you... you don't have the patience for it.

Login to post a reply

Server time is: 2024-11-22 23:21:51
Your offset time is: 2024-11-22 23:21:51