+HJFOL Posted December 31, 2014 Share Posted December 31, 2014 I start my first cartridge. At the start I made two questions with input function. After answering the first question with 'Yes' the sceond question will be shown After answering the first question with "NO" the player hast to start and the same must be done after the second question But now I get an overflow error after the first question was No and after the second question. Is it needed to close the input function ? Quote Link to comment
Ranger Fox Posted January 1, 2015 Share Posted January 1, 2015 You're probably evaluating the answer right after you ask for the input. For example, in a zone's Enter event, you have the following: "Get input #1 from the player, if answer = YES then, Get input #2 from player, else, Get input #1 from player, end if". If that's the case, you have to put your evaluation logic (the if/then/else/end if part) in the input's "When a player inputs data" event. This will produce an infinite loop because Wherigo will show the first input, then go right on with the if/then statement without waiting for the player to do something. If that's not it, can you either post a screen shot of your input's events or the cartridge's source code as an attachment? I don't even know which builder you're using to create your cartridge, so I can't provide specific examples. Quote Link to comment
+HJFOL Posted January 1, 2015 Author Share Posted January 1, 2015 You're probably evaluating the answer right after you ask for the input. For example, in a zone's Enter event, you have the following: "Get input #1 from the player, if answer = YES then, Get input #2 from player, else, Get input #1 from player, end if". If that's the case, you have to put your evaluation logic (the if/then/else/end if part) in the input's "When a player inputs data" event. This will produce an infinite loop because Wherigo will show the first input, then go right on with the if/then statement without waiting for the player to do something. If that's not it, can you either post a screen shot of your input's events or the cartridge's source code as an attachment? I don't even know which builder you're using to create your cartridge, so I can't provide specific examples. Ok that was the problem. I thought that is some cases it is not needed to use if - then, because I only want to set a variable that I neede later on in the game. But I created one with a compare and nothing more and gone was the error.... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.