if your Attribute is to be a String Attribute, then you must have its Value be encased in double quotes (or if you got an Expression, the textual parts must be encased in double quotes), this is because:
(ya it's very annoying to remember: I've had the same situation myself, trying to trouble shoot for hrs only to finally realize it was because I forgot to use double quotes, and~or confusing too if you're still learning to code)
no double quoted (non-numerical) Value (except for 'true' and 'false' as these are reserved for~as the Boolean Attribute's Values), tells quest engine that its Value is an actual Object (and not just a String Attribute's String Value):
player.lunchbag_object_attribute = apple
<object name="apple_object_1">
<alias>apple</alias>
</object>
<object name="player">
<attr name="lunchbag_object_attribute" type="object">apple_object_1</attr>
</object>
// an Object and an Object Attribute, are two different things. An Object is well an actual Object, lol. Whereas, an Object Attribute is an Attribute which HOLDS an Object, as its Value.
// the best analogy Object Attribute: player.right_hand = sword
no double quoted (numerical) Value, tells the quest engine that it is an Integer Attribute:
player.strength = 50
a quoted Value tells the quest engine that it is a String Attribute:
player.favorite_food = "apple"
player.favorite_number = "7"
-----------
to re-cap:
player.food_string_attribute = "apple"
VS
player.food_object_attribute = apple
<object name="apple">
</object>
------------
to re-cap:
player.number_integer_attribute = 7
// this Value is an actual number, so it can be used to do computation (addition, subtraction, multiplication, division, and comparisons: greater than, lesser than, and etc) Expressions
VS
player.number_string_attribute = "7"
// this is NOT an actual number Value, so you can NOT use it to do computation Expressions
----------
you can convert between a String Attribute and an Integer Attribute:
player.number_integer_attribute = ToInt (player.number_string_attribute)
// 7 <===== "7"
player.number_string_attribute = ToString (player.number_integer_attribute)
// "7" <===== 7
----------
another syntax method, an example (using 'or' conditionals):
msg ("What is your name?")
get input {
if (result = "joe" or result = "jeff" or result = "jim" or result = "john") {
player.gender_string = "male"
} else if (result = "jennifer" or result = "jessisca" or result = "jasmine") {
player.gender_string = "female"
} else {
player.gender_string = "asexual"
}
}
-------
another method, is to use List Attributes instead:
if (ListContains (player.witch_pot_objectlist, toad) and ListContains (player.witch_pot_objectlist, rat) and ListContains (player.witch_pot_objectlist, mushroom)) {
// (after drinking the brew) you turn into a ...
} else if (ListContains (player.witch_pot_objectlist, cat) and ListContains (player.witch_pot_objectlist, dog) and ListContains (player.witch_pot_objectlist, pig)) {
// (after drinking the bew) you turn into a ...
}
-----------------
do read up on 'and', 'or' ( 'XOR' ~ exclusive or ), and etc conditionals, to understand their usage, if you don't already know aobut them.
you can use parenthesis, to control the 'order of operations' and via doing groupings, just like you do with~in math, for 'and' and 'or' conditionals too.
---------------
though as you can see, these quest~XML syntax methods are much more typing than using the 'regex and the | symbol' syntax methods that more common programming languages use (and quest can use them too), that Pixie and TinFoil talk about in their posts.
--------------
P.S.
@Xanadu:
welcome to the 'fun' (sarcasm) of trouble-shooting ~ diagnosing... !!!
though, if you can successfully trouble shoot, it's proof~verification that you ARE learning to code, hehe
and... 90% of the time, usually the $@$#@ problem is some stupid simple typo or missing character~symbol... which is a relief in that you got the code design correct, but also a huge irritant that you spent that much time, just to find and fix something so stupid and simple, laughs. I mean if you spend hrs, the problem should be a major flaw in your code design, and you just amazingly fixed it up, into a beautiful code design, hehe. But often your code design is fine... and it's just something stupid~simple... but finding the thing... usually does take a long time... ARGH~GRRR !!!!
(though the error codes help, as they tell you the line and character of the problem... hehe, and if you use text software, such as notepad++, that tells the mouse~cursors, line and character location, then it helps to speed up the trouble shooting, immensely)