Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Thanked 0 Times in 0 Posts

    Exclamation Code will not stop calling my main function, even when I try to exit.

    For some reason, even when I call a function that doesn't call back to another function it just keeps calling my getClass(); function

    This has been driving me nuts for the past few days, and I have no clue how to fix it.

    the code in it's entirety is here:


    Since it never ends debugging it is a pain seeing as how I have to force quit every time I figure out there's still a problem.

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    So change your code to allow a player to end the game.

    Maybe in getClass() you accept "end" as an answer and when you get that you end the game.

    I hope you realize that prompt() and confirm() and alert() are all considered very very obsolete and should never be used in any contemporary web page.
    Be yourself. No one else is as qualified.


Tags for this Thread

Posting Permissions

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