Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12
  1. #1
    Join Date
    Dec 2003
    Posts
    163

    Grin Missing: Goto Label, Return

    hi.
    in autoplay 4 you coud use "Goto LABEL" to jump to specific areas of your code and "Return" to "exit" and stop execution of lines below. is there a way to do this in autoplay 5 too?

    for example: i want to stop execution of code below if user enters an invalid username but how can i do it? :confused:

    hope someone can help.

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi, sorry that feature is deprecated.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    I would look at using functions. Defind your functions on Project->Global Functions and when you are coding use an if statement to perform one or the other.

  4. #4
    Join Date
    Dec 2003
    Posts
    163

    Huh?

    hmm i will try it with functions

    but why did you remove it from autplay 5? :(

  5. #5
    Join Date
    Dec 2003
    Posts
    163
    hm is it possible to call an empty function to do "nothing"?
    or must a function contain something? can i use just "Var1 = "";" or something like that if it cant be emtpy to let it do "nothing"? :confused:

  6. #6
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    No need to use functions. Just use an if statement to control whether the code is performed. Like this:

    Code:
    if username ~= "George" then
        -- do a bunch of stuff if username isn't "George"
    end

  7. #7
    Join Date
    Dec 2003
    Posts
    163
    hm right, i used an if-statement now
    here what i did:

    PHP Code:
    DesiredUserName Dialog.Input("Enter your desired Registration Name""Your Name:"""MB_ICONQUESTION);

    if (
    DesiredUserName == "CANCEL") or (DesiredUserName == ""then
        Dialog
    .Message("Title""EMPTY!")
    else
        
    UserEmail Dialog.Input("Enter your e-Mail Adress""Your e-Mail: (must be the address you use to send us your order)"""MB_ICONQUESTION);
        if (
    UserEmail == "CANCEL") or (UserEmail == ""then
            Dialog
    .Message("Title""ERROR!")
        else
            -- 
    WIRTE TEXTFILE or do anything
        end
    end 



    seems its not really important to use an emtpy function cause with the if statement i can do "nothing" if it fails, right?

    example:
    if (bla == "") then

    else
    -- do something here
    end

    that works, right? :confused:
    but just for fun, is it possible to use emtpy functions?
    Last edited by SonG0han; 12-15-2003 at 12:57 PM.

  8. #8
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    Originally posted by SonG0han
    seems its not really important to use an emtpy function cause with the if statement i can do "nothing" if it fails, right?

    example:
    if (bla == "") then

    else
    -- do something here
    end

    that works, right? :confused:
    Yep.

    but just for fun, is it possible to use emtpy functions?
    Yep.

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    The non productive code seems cofusing to me.

    Why not use a not equals instead?

    if (bla ~= "") then
    -- do something here
    end

  10. #10
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Here, I've refined it even further, technically this is legal code:

    if a then
    end

    Corey Milner
    Creative Director, Indigo Rose Software

  11. #11
    Join Date
    Dec 2003
    Posts
    163
    right worm, thats better

  12. #12
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    What a great brainstorming community.

    Watch out so you don't shock your self.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts