User win
Moderator: DosItHelp
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: User win
The "that was old code, please do the same thing with my new code" sounded rather dismissive.
And the triple-nested for loop notwithstanding, Aacini's code is relatively straightforward and if you go through it line by line you could probably figure out what everything does and make the necessary updates yourself.
And the triple-nested for loop notwithstanding, Aacini's code is relatively straightforward and if you go through it line by line you could probably figure out what everything does and make the necessary updates yourself.
Re: User win
Oh, I am very sorry about that. I didn't mean to express what I said in a 'mean' way. All I wanted was a game, I tried making it, I did, but it wasn't that good. And, I have gone through it line by line and I just can't understand what all those terms mean. I might sound dumb to you but programming isn't my main subject. I love computers, and I am really good, but i just suck at programming. Thanks for the feedback, i wont write like that anymore. thanks.
Re: User win
117Mickey wrote:How do you know I didn't run it
I said you didn't discuss the improvements, or give any indication that you had run it.
Re: User win
Oh, no i did run it. It is really impressive, all i wanted was if he could spare a couple of minutes to remake it. I didn't mean it in a mean way.
Re: User win
I know I might sound lazy and I am not doing it myself. But I really need help, I couldn't understand Aacini's code.
Re: User win
117Mickey wrote:But I really need help, I couldn't understand Aacini's code.
That's what the forum is here for - write down and tell us the part(s) you don't understand and
you will get examples and some explanation.
Re: User win
117Mickey wrote:I know I might sound lazy and I am not doing it myself. But I really need help, I couldn't understand Aacini's code.
I don't understand your concern. Accordingly to your request, you wrote a Batch file and you wanted to modify it so "when user inputs North 2 times and South 3 times, the user will be taken to a new branch where it will say the user has won". My answer to your request was this:
Aacini wrote:Insert the following modifications:Code: Select all
:Start
set win=0
. . .
:North
if %win% lss 2 (set /A win+=1) else set win=0
. . .
:East
set win=0
. . .
:South
if %win% geq 2 set /A win+=1
if %win% equ 5 echo You won & goto :EOF
. . .
:West
set win=0
. . .
After that, you should have replied saying if the modifications worked as expected, or if they requires an adjustment. However, instead of that, you replied:
117Mickey wrote:Oh, thank you very much. But one last thing. That code i posted above was an old version. Could i post my new one and then you could work of that. Thanks very much.
And then you posted a code larger than the former one!. It seems this phrase didn't matter you:
Aacini wrote:PS - In order to do a modification of this type, an understanding of the program is needed. Your code is very confusing...
... and you just throw a new code expecting that I review and understand it again, so "I could work of that"!
In my opinion, you should have tested the modifications on the original code and then insert they in the new code. If the modifications don't works in the new code, you should have reviewed how the changes in the new code affects the former one, and then posted just the involved parts when you asked for further help. In other words, you should have tried to distract our attention the less possible time, so we be willing to help you. However, you acted like if you would hired me. It seems that was a mistake for my side to post such code...
Antonio
PS - If the problem is that you don't understand my code, then just leave it aside and work with your own code. Note that my code bear NO RELATION to your original problem!
Re: User win
Ok, thanks very much. I understand what you mean. Thanks
Re: User win
Oh also, i fixed parts of it. I have another question. I tried making my code so when you enter a name, it saves it and continues. What i also made was when user inputed admin it would take it to a cheat page showing how to win the game.
echo Enter your name below
SET /P NN=%NN%
if %NN% equ admin goto Admin
else goto Start
:Admin
cls
echo To win the game, go North 2 times and South 3 times
pause
goto Menu
Would this work?
echo Enter your name below
SET /P NN=%NN%
if %NN% equ admin goto Admin
else goto Start
:Admin
cls
echo To win the game, go North 2 times and South 3 times
pause
goto Menu
Would this work?
Re: User win
Hi, don't worry I fixed it. Last thing, I would be greatly happy if anyone replies. How do i make it so instead of inputting 'Educate' just input 'E' or 'e' and it doesn't have to make me click on enter for it to work. Aacini's code had this but i couldn't find the code he posted on the forum anymore. Thanks
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: User win
It's the choice command in his code
Re: User win
So how would i do it. I dont understand.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: User win
117Mickey wrote:I even saved it next to my old version.
Did you delete it?
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: User win
Code: Select all
CHOICE [/c [choiceKeys]] [/N] [/CS] [/t Timeout /d Choice] [/m Text]
key
/C[:]choiceKeys : One or more keys the user can press. Default is YN.
/N : Do not display choiceKeys at the end of the prompt string.
/CS : Make the choiceKeys Case Sensitive.
/T Timeout : Timeout in Timeout seconds
If Timeout is 0 there will be no pause and the
default will be selected.
/d choice : Default choice made on Timeout.
/m text : Message string to describe the choices available.
ERRORLEVEL will return the numerical offset of choiceKeys.
Example:
CHOICE /C CH /M Select [C] CD or [H] Hard drive
IF errorlevel 2 goto sub_hard
IF errorlevel 1 goto sub_cd
The order of the IF statements above matters, IF errorlevel 1 will return TRUE for an errorlevel of 2
Re: User win
1. Yes I did delete it as I didn't want you guys to make me feel guilty of being lazy amd programming it myself.
2. That is just copy paste from the website you gave me. Could you specifiy an example please.
Thanks.
2. That is just copy paste from the website you gave me. Could you specifiy an example please.
Thanks.