Get Input requires two entries?

OurJud
04 Dec 2016, 23:33Can anyone see why when I test this, I get a blank response the first time I enter a code? The 'correct' and 'incorrect' script works, but I have to enter the code twice before getting a response.
if (GetBoolean(player, "gotCode")) {
msg ("You open the door to find the cuboard filled with an array of different meds, all in bland white boxes.")
}
else {
msg ("As you might expect in a place like this, the cupboard is locked and requires a four-digit access code.")
get input {
get input {
if (result = "4458") {
msg ("The light on the panel turns from red to green.")
SetObjectFlagOn (player, "gotCode")
}
else {
msg ("A low tone indicates an incorrect code and the light on the panel remains red.")
}
}
}
}
Doh! Never mind, I didn't notice the two 'get inputs' until I posted it on here.
Pertex
05 Dec 2016, 09:43Why do you use two GetInputs one behind the other?
get input {
get input {

OurJud
05 Dec 2016, 14:04I don't remember now. I think I copy/pasted a script from another room because I wasn't sure how to do it off the top of my head, and just pasted it in wrong.
hegemonkhan
06 Dec 2016, 00:19be very careful with copy and pasting, I know from my own personal experience, I copy and paste something, but I forget to change something within it, grr. Or, maybe the worst, is to accidentally copy a space to the left or right of what you want to copy... good luck finding that space that's causing the unknown (as you don't know you accidentally copied in a space) error in your code...
Also, if deleting/removing/changing code or the GUI-Editor scripts... you sometimes have lingering/altered-incomplete code lines/blocks... that you got to manually (in-code) go into and fix them up.