[SOLVED] "Get Input" inside of a "Get Input"?

Anonynn
16 Mar 2016, 05:03
I know there was a way that you could do a "Get Input" inside of a "Wait for Keypress" script, but can you do "Get Input" inside of a "Get Input"?

And if you can't do this....does anyone have suggestions?

I ask a yes or no question, and then a prompt afterward for the player to pick something.

HegemonKhan
16 Mar 2016, 09:58
the 'wait for keypress' causes issues as there's a lot of issues with the commands that get user input ('get input' and 'show menu' and the 'ask' Verb), unfortunately.

--------

actually, doing (a single-direct chain, nesting, of) 'get input/show menu/ask' inside of 'get input/show menu/ask' is the easiest way to get it to work, without issues, for example:

<function name="character_creation">
msg ("What is your name?")
get input {
player.alias = result
msg ("What is your age?")
get input {
player.age = result
show menu ("What is your sex?", split ("male; female", ";"), false) {
player.sex = result
show menu ("What is your race?", split ("european; asian; african; arabian; american", ";"), false) {
player.race = result
msg ("What is your favorite number?")
get input {
player.favorite_number = result
msg ("What is your least favorite number?")
get input {
player.least_favorite_number = result
ask ("Are you smart?") {
player.smart = result
ask ("Are you attractive?") {
player.attractive = result
// etc etc etc 'get input/show menu/ask'
}
}
}
}
}
}
}
}
</function>

XanMag
16 Mar 2016, 10:29
For my computer system for one of my games, I have a get input that requires a password (same as your yes/no essentially).

Then, if the password is correctly typed, a function is called where I have all the cases for the computer.

          msg ("You move the mouse and the screen changes to...")
picture ("password1.png")
msg ("What will you enter?")
get input {
switch (result) {
case ("correctpassword") {
SetObjectFlagOn (computer, "hacked")
IncreaseScore (10)
msg ("<br/>The password screen fades away and you are presented with another option.<br/><br/>Which program would you like to run (type 'stop' to stop using the computer)?<br/>1 - Dingo Database<br/>2 - Compound Information<br/>Stop - stop using computer<br/>")
get input {
switch (result) {
case ("1") {
computer loop
}
case ("2") {
computer loop 2
}
case ("stop") {
msg ("<br/>You type stop and hit enter. You back away from the computer and look for better things to do.<br/>")
MoveObject (Xanadu, sarlashkars office)
}
default {
msg ("Input not recognized.")
default to program
}
}
}
}
default {
msg ("You type in " + result + " and hit enter. You immediately receive a nasty little shock! Those security encryptions sure do sting!")
DecreaseHealth (3)
}
}
}
}

Anonynn
16 Mar 2016, 15:37
Thanks Hk and Xan, those are extremely useful. Though, I thought what I did was a single string. Here's the code.

msg ("<br/>Inside, you can see several elegant dresses... <br/><br/>Would you like to dress up? <i>Yes</i> or <i>No</i>? <br/>")
get input {
if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result))) {
get input {
msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>- Throw on any old thing like you just don't care?<br/><br/>- Or do those female tunics tickle your fancy?<br/><br/>((In these situations, you must pick what personality inflection to go with. All you have to do is type one of the choices: sexy, sympathy, sarcasm, serious. These responses will be tallied as the game progresses! If you spell something wrong however, you will not receive a personality point, and will receive a boring response!))<br/>")
switch (LCase(result)) {
case ("sexy") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sexy = player.sexy + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sexy = player.sexy + 1
}
else if (player.race="halfling") {
msg ("<br/>Lots of text here!<br/>")
player.sexy = player.sexy + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sexy = player.sexy + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sympathy") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sarcasm") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/><br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("serious") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
default {
msg ("<br/>You went to try on some of the dresses, but panicked at the last moment about messing with {if player.methannah=False:other people's belongings. What if someone walked in on you!?}{if player.methannah=True:What if Hannah or Rold happened to walk in on you trying on their clothing? Especially before you've had a bath. You'd feel furious, so they probably would too.} Maybe if you had more time and less plastic to fiddle around with you could have had some fun with this. It takes about ten minutes or so, but you return all the dresses to their proper place and make sure the plastic that was covering them is doing so once again!<br/><br/>((Oops! You must have misspelled something! Or typed in something other than the four personality responses. Remember when prompted: you must type in, <i>sexy</i>, <i>sympathy</i>, <i>sarcasm</i>, or <i>serious</i>. If you do not, then you will not receive any personality points for that response and the response will be plain and boring!)) <br/>")
}
}
}
}
else {
msg ("<br/>You decide against trying on the dresses. {if player.gender=female:You don't have the time to play dress-up and you've got better things to do at the moment.}{if player.gender=male:You just aren't interested in this sort of thing.} Maybe later, maybe not?<br/>")
}
}



So what did I do differently that yours are stopping for and mind isn't? Should I use a "show menu" to replace the second "Get input"?

XanMag
16 Mar 2016, 16:21
if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result))) {
SHOULD YOU HAVE A PRINT MESSAGE IN HERE ASKING THE QUESTION?
get input {
msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>...


Perhaps I am not seeing it correctly or I misunderstand you, but should you have a message printed before this Get Input script? Just a guess... I'm not real good at looking at code and making suggestions.

Anonynn
16 Mar 2016, 16:38
There is a msg("") before hand that asks the question :)

XanMag
16 Mar 2016, 19:01
It looks to me that if I answer "yes" to the dress up question, then it immediately goes to another get input.

Shouldn't it be: ask your yes/no question, switch/get input, add cases yes and no
If "yes" case, then ask another question "what clothes do you want to wear, switch/get input, add cases for outfit choices

Again, I'm probably seeing something wrong. I'll create a simple version of what you have when I get home.

Anonynn
16 Mar 2016, 19:39
Yeah, it's basically.

msg ("Question here")
get input "Yes or No"
"yes"
msg ("Which clothes do you want to try on?" Pick from: sexy, sympathy, sarcasm, serious")
get input
switch
sexy
sympathy
sarcasm
serious

That's pretty much the code.

HegemonKhan
16 Mar 2016, 22:16
it's very easy to mess up the nesting (especially if using the GUI~Editor's "add a script" circle buttons... figuring out what "add a script" circle button is the correct one you want to click on, is very difficult... lol), so it's probably a simple issue of this, just have to find it...

you want your code/scripts to be like this (a single chain, so not have to deal with any of the real issues with the user input commands, which will cause errors):

script1
.....\
.....script2
.........\
..........script3
..............\
..............etc etc etc

you can ahve variations of this, but you want it to be in this single 'nesting' chain... if you can do so... otherwise, you may be dealing with the real issues, which are even harder to try to work around...

----------

for example:

get input
.......\
.......get input // no error
............\
............get input // no error

~ VS ~

get input
.......\
.......get input // no error
.......|.....\
.......|......get input // no error
.......|
.......get input // ERROR!, as only one get input can be running at a time

Anonynn
16 Mar 2016, 23:05
Oh, I don't use the GUI Editor so much these days, except when writing long msg's ("").

You're saying I need to have them in a staircase sort of order, I thought I had that though.

Cause it's ...

firsttime
..msg
.....get input
.......if "yes"
..........msg
.............get input
...............switch
.................sexy
..........sympathy
.....sarcasm
...serious
if player.race= goblin
yada yada...

The error is happening where the bold is. It just runs the two inputs together.

XanMag
17 Mar 2016, 01:39
I'm still confused as to why you have to nest them anyway?

Here's how I do it through the GUI. Pardon the train wreck...

first get input.png

yes case pic.png


Is this not an option? You've got me curious.

Anonynn
17 Mar 2016, 04:10
Oh, I never thought of doing it like that. Making a switch out of a "yes" or "no" that is. I guess I could give it a shot and see how that works :P None of my other "yes" "no" scripts are like that haha. Thanks for the suggestion! And appreciate your help too HK. I'll ring back if something goes awry.

HegemonKhan
17 Mar 2016, 10:32
this wouldn't be correct:

firsttime
..msg
.....get input
.......if "yes"
..........msg
.............get input
...............switch
.................sexy
..........sympathy
.....sarcasm
...serious
if player.race= goblin
yada yada...

it should be:

firsttime
..msg
.....get input
.......if "yes"
..........msg
.............get input
...............switch
.................case(sexy)
...................scripts
.................case(sympathy)
...................scripts
.................case(sarcasm)
...................scripts
.................case(serious)
...................scripts
otherwise // I'm guessing on this part, as I don't have information of where this would go from what you've given
..if player.race= goblin
yada yada...

or, if this is what is (suppose to be) happening:

firsttime
..msg
.....get input
.......if "yes"
..........msg
.............get input
...............switch
.................case(sexy)
...................scripts
.................case(sympathy)
...................scripts
.................case(sarcasm)
...................scripts
.................case(serious)
...................scripts
......if player.race= goblin // if this was suppose to be here, matching up with the first get input's 'if yes' : if (yes), [else if (no)], then if (player.race=goblin)
yada yada...

then it needs to be like this:

firsttime
..msg
.....get input
.......if "yes"
..........msg
.............get input
...............switch
.................case(sexy)
...................scripts
.................case(sympathy)
...................scripts
.................case(sarcasm)
...................scripts
.................case(serious)
...................scripts
.......else if player.race= goblin
yada yada...

------

so, if that was your form, then it's not the 'get input' directly, but rather you got some of your switch cases (this would correspond with your second-last/lower get input) outside of where tehy're suppose to be or your 'if player.race=goblin' is outside of where it is suppose to be (this would correspond with the first-upper get input).

HegemonKhan
17 Mar 2016, 11:13
errr... nvm... I just actually looked at your code (now finally having the time to do so ~ I had an assembly code/program school assignment that I was trying to get done, which I failed to do so, sighs. I'll be glad if I get a C in the class, assembly is quite a step up from the high level languages like quest and etc, assembly works completely differently, what I know with the high level languages really doesn't help me much with assembly):

and I fixed it (the nesting) up for you:

msg ("<br/>Inside, you can see several elegant dresses... <br/><br/>Would you like to dress up? <i>Yes</i> or <i>No</i>? <br/>")
get input {
  if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result))) {
    get input {
      msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>- Throw on any old thing like you just don't care?<br/><br/>- Or do those female tunics tickle your fancy?<br/><br/>((In these situations, you must pick what personality inflection to go with. All you have to do is type one of the choices: sexy, sympathy, sarcasm, serious. These responses will be tallied as the game progresses! If you spell something wrong however, you will not receive a personality point, and will receive a boring response!))<br/>")
      switch (LCase(result)) {
        case ("sexy") {
          if (player.race="goblin") {
            msg ("<br/>Lot's of text here!<br/>")
          player.sexy = player.sexy + 1
        }
        else if (player.race="gnome") {
          msg ("<br/>Lot's of text here!<br/>")
        player.sexy = player.sexy + 1
      }
      else if (player.race="halfling") {
        msg ("<br/>Lots of text here!<br/>")
      player.sexy = player.sexy + 1
    }
    else if (player.height<="4.0") {
      msg ("<br/>Lot's of text here!<br/>")
    player.sexy = player.sexy + 1
  }
  else {
    msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
  }
}
case ("sympathy") {
  if (player.race="goblin") {
    msg ("<br/>Lot's of text here!<br/>")
  player.sympathy = player.sympathy + 1
}
else if (player.race="gnome") {
  msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sarcasm") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/><br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("serious") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
default {
msg ("<br/>You went to try on some of the dresses, but panicked at the last moment about messing with {if player.methannah=False:other people's belongings. What if someone walked in on you!?}{if player.methannah=True:What if Hannah or Rold happened to walk in on you trying on their clothing? Especially before you've had a bath. You'd feel furious, so they probably would too.} Maybe if you had more time and less plastic to fiddle around with you could have had some fun with this. It takes about ten minutes or so, but you return all the dresses to their proper place and make sure the plastic that was covering them is doing so once again!<br/><br/>((Oops! You must have misspelled something! Or typed in something other than the four personality responses. Remember when prompted: you must type in, <i>sexy</i>, <i>sympathy</i>, <i>sarcasm</i>, or <i>serious</i>. If you do not, then you will not receive any personality points for that response and the response will be plain and boring!))  <br/>")
}
}
}
}
else { // comments can help here, to let you know what these far down code lines are matching up with/attached to: if (ListContains () ), else... (see below)
msg ("<br/>You decide against trying on the dresses. {if player.gender=female:You don't have the time to play dress-up and you've got better things to do at the moment.}{if player.gender=male:You just aren't interested in this sort of thing.} Maybe later, maybe not?<br/>")
}
}


---------------

there's different forms/styles you can do, all are the same, but you may like one over another:

(this one is the same as the one above)
msg ("<br/>Inside, you can see several elegant dresses... <br/><br/>Would you like to dress up? <i>Yes</i> or <i>No</i>? <br/>")
get input {
  if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result))) {
    get input {
      msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>- Throw on any old thing like you just don't care?<br/><br/>- Or do those female tunics tickle your fancy?<br/><br/>((In these situations, you must pick what personality inflection to go with. All you have to do is type one of the choices: sexy, sympathy, sarcasm, serious. These responses will be tallied as the game progresses! If you spell something wrong however, you will not receive a personality point, and will receive a boring response!))<br/>")
      switch (LCase(result)) {
        case ("sexy") {
          if (player.race="goblin") {
            msg ("<br/>Lot's of text here!<br/>")
          player.sexy = player.sexy + 1
        }
        else if (player.race="gnome") {
          msg ("<br/>Lot's of text here!<br/>")
        player.sexy = player.sexy + 1
      }
      else if (player.race="halfling") {
        msg ("<br/>Lots of text here!<br/>")
      player.sexy = player.sexy + 1
    }
    else if (player.height<="4.0") {
      msg ("<br/>Lot's of text here!<br/>")
    player.sexy = player.sexy + 1
  }
  else {
    msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
  }
}
case ("sympathy") {
  if (player.race="goblin") {
    msg ("<br/>Lot's of text here!<br/>")
  player.sympathy = player.sympathy + 1
}
else if (player.race="gnome") {
  msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sarcasm") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/><br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("serious") {
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
default { // switch's default (else) case command
msg ("<br/>You went to try on some of the dresses, but panicked at the last moment about messing with {if player.methannah=False:other people's belongings. What if someone walked in on you!?}{if player.methannah=True:What if Hannah or Rold happened to walk in on you trying on their clothing? Especially before you've had a bath. You'd feel furious, so they probably would too.} Maybe if you had more time and less plastic to fiddle around with you could have had some fun with this. It takes about ten minutes or so, but you return all the dresses to their proper place and make sure the plastic that was covering them is doing so once again!<br/><br/>((Oops! You must have misspelled something! Or typed in something other than the four personality responses. Remember when prompted: you must type in, <i>sexy</i>, <i>sympathy</i>, <i>sarcasm</i>, or <i>serious</i>. If you do not, then you will not receive any personality points for that response and the response will be plain and boring!))  <br/>")
}
}
}
}
else { // comments can help here, to let you know what these far down code lines are matching up with/attached to: if (ListContains () ), else... (see below)
msg ("<br/>You decide against trying on the dresses. {if player.gender=female:You don't have the time to play dress-up and you've got better things to do at the moment.}{if player.gender=male:You just aren't interested in this sort of thing.} Maybe later, maybe not?<br/>")
}
}


---

(unfortunately, quest undoes this form, changing it into the one above, which is very annoying. This is a good form to see your if blocks. It's also the most compact; least code lines. Some people like this one the best, I am such a person, though I do like the one below for finding/catching missing starting or ending curly brackets; aka braces, as this is a common typo of mine, laughs)
msg ("<br/>Inside, you can see several elegant dresses... <br/><br/>Would you like to dress up? <i>Yes</i> or <i>No</i>? <br/>")
get input {
  if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result))) {
    get input {
      msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>- Throw on any old thing like you just don't care?<br/><br/>- Or do those female tunics tickle your fancy?<br/><br/>((In these situations, you must pick what personality inflection to go with. All you have to do is type one of the choices: sexy, sympathy, sarcasm, serious. These responses will be tallied as the game progresses! If you spell something wrong however, you will not receive a personality point, and will receive a boring response!))<br/>")
      switch (LCase(result)) {
        case ("sexy") {
          if (player.race="goblin") {
            msg ("<br/>Lot's of text here!<br/>")
          player.sexy = player.sexy + 1
        } else if (player.race="gnome") {
          msg ("<br/>Lot's of text here!<br/>")
        player.sexy = player.sexy + 1
      } else if (player.race="halfling") {
        msg ("<br/>Lots of text here!<br/>")
      player.sexy = player.sexy + 1
    } else if (player.height<="4.0") {
      msg ("<br/>Lot's of text here!<br/>")
    player.sexy = player.sexy + 1
  } else {
    msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
  }
}
case ("sympathy") { // I didn't match the style of putting the case up to the line above with the ending brace (like being done with the if blocks), as it's harder to notice the cases if I did
  if (player.race="goblin") {
    msg ("<br/>Lot's of text here!<br/>")
  player.sympathy = player.sympathy + 1
} else if (player.race="gnome") {
  msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
} else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
} else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
} else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sarcasm") { // I didn't match the style of putting the case up to the line above with the ending brace (like being done with the if blocks), as it's harder to notice the cases if I did
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
} else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
} else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/><br/>")
player.sarcasm = player.sarcasm + 1
} else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
} else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("serious") { // I didn't match the style of putting the case up to the line above with the ending brace (like being done with the if blocks), as it's harder to notice the cases if I did
if (player.race="goblin") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
} else if (player.race="gnome") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
} else if (player.race="halfling") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
} else if (player.height<="4.0") {
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
} else {
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
default { // switch's default (else) case command, // I didn't match the style of putting the case up to the line above with the ending brace (like being done with the if blocks), as it's harder to notice the cases if I did
msg ("<br/>You went to try on some of the dresses, but panicked at the last moment about messing with {if player.methannah=False:other people's belongings. What if someone walked in on you!?}{if player.methannah=True:What if Hannah or Rold happened to walk in on you trying on their clothing? Especially before you've had a bath. You'd feel furious, so they probably would too.} Maybe if you had more time and less plastic to fiddle around with you could have had some fun with this. It takes about ten minutes or so, but you return all the dresses to their proper place and make sure the plastic that was covering them is doing so once again!<br/><br/>((Oops! You must have misspelled something! Or typed in something other than the four personality responses. Remember when prompted: you must type in, <i>sexy</i>, <i>sympathy</i>, <i>sarcasm</i>, or <i>serious</i>. If you do not, then you will not receive any personality points for that response and the response will be plain and boring!))  <br/>")
}
}
}
} else { // comments can help here, to let you know what these far down code lines are matching up with/attached to: if (ListContains () ), else... (see below)
msg ("<br/>You decide against trying on the dresses. {if player.gender=female:You don't have the time to play dress-up and you've got better things to do at the moment.}{if player.gender=male:You just aren't interested in this sort of thing.} Maybe later, maybe not?<br/>")
}
}


---

(this is a good form to make sure you're not missing any of the starting and ending curly brackets; aka braces. But it causes many more lines. Also this form can make the nesting more clear for some people than the other two forms/styles above)
msg ("<br/>Inside, you can see several elegant dresses... <br/><br/>Would you like to dress up? <i>Yes</i> or <i>No</i>? <br/>")
get input
{
  if (ListContains(Split ("yes;sure;okay;of course;definitely;si;oui;yup;uh huh;hai;okie dokie;ja",";"),LCase(result)))
{
    get input
{
      msg ("<br/>But what type of dresses should you try on?<br/><br/>- The elegant dresses? <br/><br/>- The cute/modest dresses?<br/><br/>- Throw on any old thing like you just don't care?<br/><br/>- Or do those female tunics tickle your fancy?<br/><br/>((In these situations, you must pick what personality inflection to go with. All you have to do is type one of the choices: sexy, sympathy, sarcasm, serious. These responses will be tallied as the game progresses! If you spell something wrong however, you will not receive a personality point, and will receive a boring response!))<br/>")
      switch (LCase(result))
{
        case ("sexy")
{
          if (player.race="goblin")
{
            msg ("<br/>Lot's of text here!<br/>")
          player.sexy = player.sexy + 1
        }
        else if (player.race="gnome")
{
          msg ("<br/>Lot's of text here!<br/>")
        player.sexy = player.sexy + 1
      }
      else if (player.race="halfling")
{
        msg ("<br/>Lots of text here!<br/>")
      player.sexy = player.sexy + 1
    }
    else if (player.height<="4.0")
{
      msg ("<br/>Lot's of text here!<br/>")
    player.sexy = player.sexy + 1
  }
  else
{
    msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
  }
}
case ("sympathy")
{
  if (player.race="goblin")
{
    msg ("<br/>Lot's of text here!<br/>")
  player.sympathy = player.sympathy + 1
}
else if (player.race="gnome")
{
  msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.race="halfling")
{
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else if (player.height<="4.0")
{
msg ("<br/>Lot's of text here!<br/>")
player.sympathy = player.sympathy + 1
}
else
{
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("sarcasm")
{
if (player.race="goblin")
{
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="gnome")
{
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.race="halfling")
{
msg ("<br/>Lot's of text here!<br/><br/>")
player.sarcasm = player.sarcasm + 1
}
else if (player.height<="4.0")
{
msg ("<br/>Lot's of text here!<br/>")
player.sarcasm = player.sarcasm + 1
}
else
{
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
case ("serious")
{
if (player.race="goblin")
{
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="gnome")
{
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.race="halfling")
{
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else if (player.height<="4.0")
{
msg ("<br/>Lot's of text here!<br/>")
player.serious = player.serious + 1
}
else
{
msg ("<br/>Aw! Unfortunately, these dresses are a little too small for you. If you were a <i>Goblin</i>, a <i>Gnome</i> or a <i>Halfling</i> though, they'd definitely fit. Too bad. It probably would have been fun. <br/><br/>((You didn't fit the parameters of trying on the dresses this time, but try coming back a different race next time!))<br/>")
}
}
default // switch's default (else) case command
{
msg ("<br/>You went to try on some of the dresses, but panicked at the last moment about messing with {if player.methannah=False:other people's belongings. What if someone walked in on you!?}{if player.methannah=True:What if Hannah or Rold happened to walk in on you trying on their clothing? Especially before you've had a bath. You'd feel furious, so they probably would too.} Maybe if you had more time and less plastic to fiddle around with you could have had some fun with this. It takes about ten minutes or so, but you return all the dresses to their proper place and make sure the plastic that was covering them is doing so once again!<br/><br/>((Oops! You must have misspelled something! Or typed in something other than the four personality responses. Remember when prompted: you must type in, <i>sexy</i>, <i>sympathy</i>, <i>sarcasm</i>, or <i>serious</i>. If you do not, then you will not receive any personality points for that response and the response will be plain and boring!))  <br/>")
}
}
}
}
else // comments can help here, to let you know what these far down code lines are matching up with/attached to: if (ListContains () ), else... (see below)
{
msg ("<br/>You decide against trying on the dresses. {if player.gender=female:You don't have the time to play dress-up and you've got better things to do at the moment.}{if player.gender=male:You just aren't interested in this sort of thing.} Maybe later, maybe not?<br/>")
}
}

Anonynn
17 Mar 2016, 18:51
Ah! Thank you both very much! You guys definitely helped me out with this. I appreciate it. Most of my recent problems I've been able to solve on my own with a little trial and error, so I'm glad I have people to catch me a bit when I stumble across something beyond my understanding --- or rather beyond my scope of experience :) Now if I could get combat working lol.

Xan, HK <3