Another Error

new topic     » topic index » view thread      » older message » newer message

Well, I hit another snag, if anyone would be gracious enough to help!!!

Here's the code:

function AddFactions(integer C)

    sequence FactionName, FactionPassword, Correct
    integer ReturnCode

    while C do

        FactionName = prompt_string("Input the name of the new Faction\n")
        
        FactionPassword = prompt_string("Input the Factions password\n")

        puts(1, "\n")
        puts(1, "The Faction name is: ")
        puts(1, FactionName)
        puts(1, "\nThe Password is: ")
        puts(1, FactionPassword)
        puts(1, "\n")
        Correct = prompt_string("Is this correct? y/n")

        if Correct = 'y' or Correct = 'Y' then
            return ReturnCode = 1   
        end if

    end while

end function

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"
    ReturnCode = <no value>

... called from H:\test1.ex:62 

I know I'm missing something easy here...sorry I'll get the hang of this yet!!

Thanks!
Rich

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu