Re: Another Error
- Posted by c.k.lester <euphoric at cklester.com> Jan 31, 2007
- 682 views
Rich Klender wrote: > > Correct = prompt_string("Is this correct? y/n") > > if Correct = 'y' or Correct = 'Y' then > return ReturnCode = 1 > end if > The problem is in the last if/then statement, if the user inputs 'y' then it > returns to the main program, if not I want it to fall thru and the user > re-inputs > the correct data. I get the following error: > > H:\test1.ex:24 in function AddFactions() > true/false condition must be an ATOM > C = 1 > FactionName = "asdf" > FactionPassword = "asdf" > Correct = "n" You're trying to compare an atom (the 'y' and 'Y') and a sequence (Correct, which is "n"); that is a no-no in Euphoria. Use either: if find(Correct,"Yy") then or if Correct[1] = 'Y' or Correct[1] = 'y' then