home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,467 of 42,547   
   foxidrive to bluelynx.industrys@gmail.com   
   Re: I need help for my dos game   
   08 Oct 16 10:34:37   
   
   From: foxidrive@server.invalid   
      
   On 8/10/2016 07:51, bluelynx.industrys@gmail.com wrote:   
   > Hi ive been making a dos game and I cant figure out why it keeps crashing   
   when it comes to this statement, "if Letecityloss = 1 goto blackdessert3lost",   
   I would be greatful if you can fix it for me I would be grateful, the thing is   
   I dont want to work    
   on that script anymore cause I got to work on everything else for tommorow   
   which I will release my new build by then so if it could be done before   
   tommorow I would be in your debt, also if statements are a pain for me so,   
   yeah... anyway please help   
      
   You need two equals signs.   
      
   if Letecityloss == 1   
      
   But even then you aren't comparing an environment variable and it will   
   never execute the goto command.   
      
      
      
      
   Surrounding both terms in double quotes makes the test far more robust to   
   spaces and poison characters for batch scripts.   
      
   if "%Letecityloss%"=="1"   
      
      
      
      
      
   When comparing text you can add the case insensitive switch and which is   
   very handy when comparing "Game" with "game" for example.   
      
   if /i "%Letecityloss%"=="1"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca