1. Solution it the Error for the record!!!

Ok, here's what I modified it to, works with no errors now.
p.s. probably not the most elegant code, but it works and I understand it!!

Thanks again for all the help!!

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 compare(Correct, "y") = 0 then
            ReturnCode = 1
            return ReturnCode
        end if

    end while

end function

new topic     » topic index » view message » categorize

2. Re: Solution it the Error for the record!!!

On 2/1/07, Rich Klender <guest at rapideuphoria.com> wrote:
>
>        puts(1, "The Faction name is: ")
>        puts(1, FactionName)
>        puts(1, "\nThe Password is: ")
>        puts(1, FactionPassword)
>        puts(1, "\n")
>

This can be simplified:

printf( 1, "The Faction Name is: %s\n", {FactionName} )
    printf( 1, "The Password is: %s\n", {FactionPassword} )


printf() is a wonderful routine! :)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu