01-14-2012, 10:18 AM
(This post was last modified: 01-14-2012, 10:22 AM by AceInfinity.)
It's alright, but a few things
-Some of those entires can point to invalid locations, since you don't check for their existance
-You have way too many ping lines in there
-You don't use quotes to cast input to a definite string value which should be done with all user input, and also using the /i switch to make it case insensitive
Example:
Becomes:
You don't need ":" in your goto's, only when you call a block.
And i'm not sure why you do this:
You don't even need a block for that really the way I see it, instead of "goto :tree" in the line above the block, delete this entire thing and just use "tree".
Modified line:
That's just to show you, but this entire part of your script is useless in my opinion...
-Some of those entires can point to invalid locations, since you don't check for their existance
-You have way too many ping lines in there
-You don't use quotes to cast input to a definite string value which should be done with all user input, and also using the /i switch to make it case insensitive
Example:
Code:
if %input%==y goto :tree
Becomes:
Code:
if /i %input%=="y" goto tree
You don't need ":" in your goto's, only when you call a block.
And i'm not sure why you do this:
Code:
:tree
start tree.com
start tree.com
start tree.com
start tree.com
start tree.com
You don't even need a block for that really the way I see it, instead of "goto :tree" in the line above the block, delete this entire thing and just use "tree".
Modified line:
Code:
if /i %input%=="y" tree
That's just to show you, but this entire part of your script is useless in my opinion...
Code:
echo Do you want to start tree? (y/n)
set /p input=
if %input%==y tree
if %input%==n goto :a
echo Invelid input. Please type Y if yes or N if no.
:tree
start tree.com
start tree.com
start tree.com
start tree.com
start tree.com