dimanche 25 janvier 2015

Batch - If Else statement not working correctly

My batchfile outputs both IF and ELSE IF...


The code goes something like this:



@echo off

set food=0

if %food%== LSS 1 (
echo You have no food.
) else if %food%== GTR 1 (
echo You have %food% food!
)
pause


Can anyone help me out?


Screenshot: http://ift.tt/1uNETUw


Aucun commentaire:

Enregistrer un commentaire