Sinisterly
Must be the Ganja - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Must be the Ganja (/Thread-Must-be-the-Ganja)

Pages: 1 2


Must be the Ganja - TOP. - 04-14-2012

So I used to make Batch viruses but I retired so I just made a quick and simply 1 questioner I hope you like it Smile
Spoiler:
Code:
@Echo Off Title Must be the Ganja color 0a :question echo Do you smoke weed? set /p input= if '%input%' == 'yes' goto yes if '%input%' == 'no' goto no :yes cls echo YOUR GOING TO DIE FROM LUNG CANCER OMG? pause goto trolol :trolol echo Switch now before you die :( goto :trolol :no color B echo good job brother! now you won't die from lung cancer. echo see you on the flip side. echo. pause exit // Code made by T.O.P
Tell me what you think about it.



RE: Must be the Ganja - ArkPhaze - 04-14-2012

Code:
:question

This isn't called anywhere, so this can be left out.

Code:
if '%input%' == 'yes' goto yes if '%input%' == 'no' goto no

If the answer is neither it will goto :yes anyways. You should also be using the /i switch to check for non-case sensitive input.

Code:
goto trolol :trolol

It's going to go there anyways regardless of whether you input goto trolol or not.

My honest opinion is that its still just really basic. I see too many of this kind of thing with a menu and just echo commands.

Spoiler:
Code:
@echo off Title Must be the Ganja color 0a :question echo Do you smoke weed? set /p input= if /i '%input%' == 'yes' goto yes if /i '%input%' == 'no' goto no echo Invalid response... goto question :yes cls echo YOUR GOING TO DIE FROM LUNG CANCER OMG? pause :trolol echo Switch now before you die :( goto :trolol :no color b echo good job brother! now you won't die from lung cancer. echo see you on the flip side. echo. pause && goto :eof



RE: Must be the Ganja - ArkPhaze - 04-14-2012

Code:
:question

This isn't called anywhere, so this can be left out.

Code:
if '%input%' == 'yes' goto yes if '%input%' == 'no' goto no

If the answer is neither it will goto :yes anyways. You should also be using the /i switch to check for non-case sensitive input.

Code:
goto trolol :trolol

It's going to go there anyways regardless of whether you input goto trolol or not.

My honest opinion is that its still just really basic. I see too many of this kind of thing with a menu and just echo commands.

Spoiler:
Code:
@echo off Title Must be the Ganja color 0a :question echo Do you smoke weed? set /p input= if /i '%input%' == 'yes' goto yes if /i '%input%' == 'no' goto no echo Invalid response... goto question :yes cls echo YOUR GOING TO DIE FROM LUNG CANCER OMG? pause :trolol echo Switch now before you die :( goto :trolol :no color b echo good job brother! now you won't die from lung cancer. echo see you on the flip side. echo. pause && goto :eof



RE: Must be the Ganja - TOP. - 04-14-2012

Alright thanks for examining my code haha I haven't been coding for at least 2-3 years.


RE: Must be the Ganja - TOP. - 04-14-2012

Alright thanks for examining my code haha I haven't been coding for at least 2-3 years.


RE: Must be the Ganja - Shining White - 04-15-2012

ROFL , Ganja.... Biggrin , what was in your mind dude ???


RE: Must be the Ganja - Shining White - 04-15-2012

ROFL , Ganja.... Biggrin , what was in your mind dude ???


RE: Must be the Ganja - TOP. - 04-15-2012

(04-15-2012, 01:59 PM)๖ۣۜShining ๖ۣۜWhite Wrote: ROFL , Ganja.... Biggrin , what was in your mind dude ???
Alot of crazy things Smile


RE: Must be the Ganja - TOP. - 04-15-2012

(04-15-2012, 01:59 PM)๖ۣۜShining ๖ۣۜWhite Wrote: ROFL , Ganja.... Biggrin , what was in your mind dude ???
Alot of crazy things Smile


RE: Must be the Ganja - DaPaus - 04-15-2012

@PhazeShift: at the end of the code there is "pause && goto :eof"
But where exactly is :eof going to?