Jump to content

Input


HJFOL

Recommended Posts

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 ?

Link to comment

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.

Link to comment

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....

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...