if the problem isn't fixed... you may need to surround it in double quotes:
"You look at the {gun.alias}."
or, you may need to change the [message] option to the [expression] option, and type in this (it's the same as the above line):
"You look at the {gun.alias}."
--------------
Note: I learned how to do VARIABLES the "normal (more confusing, lol)" way, I don't use the much more simple and non-confusing text processor commands much, so that's why I'm using the "normal" way and not text processor commands, below
-------------
hopefully, you understand basic Algebra, algebraic substitution, using variables:
x = 10 // the Variable and its Value (a simple Expression: 10)
y = x + 5 // the Variable and its Value (a complex Expression: x + 5)
// y = (10) + 5 = 15
well, that's the exact same thing as is done with programming/coding/quest, except we can use any string for our VARIABLE name and work with strings/text for the expressions, as well as using numeric amounts/values:
Variables:
Variable_name = Value
Variable_name: x
Variable Value: 10
x = 10 // the Variable and its Value (a simple Expression: = 10)
msg ("The value is " + x + ".") // think of the 'msg' key-word/key-command as like the 'y' Variable (except it's doing an action, as it's a key-command/Script/Function), and the content inside of the parenthesis is its Value (a complex expression: "The value is " + x + ".")
// output: The value is 10.
// if we change the value of x from 10 to 5, then the output is: The value is 5.
value = 10
msg ("The value is " + value + ".")
// output: The value is 10.
abc_def = 50
msg ("The value is " + abc_def + ".")
// output: The value is 50.
m = 21
msg ("The value is " + m + ".")
// output: The value is 21.
------
now programming has Attribute VARIABLES too:
Object_name.Attribute_name = Value
Object_name: game
Attribute_name: x
Attribute Value: 10
game.x = 10
msg ("The value is " + game.x + ".")
// output: The value is 10.
player.strength = 100
player.alias = "john smith"
HK.intelligence = 0
orc.dead = false
orc.dead = true
player.flying = false
player.flying = true
<object name="sword">
</object>
player.right_hand = sword
game.greeting = "Hi, welcome to my game, I hope you don't die, as dying in the game, will kill you in real life, good luck, you'll need it, muwhaha!"
HK.favorite_color = "black"
HK.favorite_color_list = split ("black;red", ";")
game.conditions_list = split ("normal;poisoned; stunned; asleep; dead; unconscious; paralyzed; petrified; silenced", ";")
player.conditions_list = split ("normal", ";") // player's condition(s): normal
list remove (player.conditions_list, "normal") // player's condition(s): null (none/blank)
list add (player.conditions_list, "poisoned") // player's condition(s): poisoned
list add (player.conditions_list, "paralyzed") // player's condition(s): poisoned and paralyzed
Attributes are held/contained by/in Objects, so, so long as the Object exists/still exists, you can use an Attribute anywhere, it is 'global'
whereas just a Variable VARIABLE, is only stored/saved for that specific Script location in the game that it is within, once the Script is finished, the Variable is erased ~ it is NOT preserved, so you can't use that Variable elsewhere in your game ~ you'll get an error as the Variable doesn't exist (as it was erased), it is 'local'. This is the difference between Variable VARIABLES and Attribute VARIABLES.
------------------------
'if' Scripting (conditionals) examples:
if (x = 10) {
msg ("The value is " + x + ".")
} else if (x > 10) {
msg ("The value is " + x + ". This is greater than 10.")
} else if (x < 10) {
msg ("The value is " + x + ". This is lesser than 10.")
}
// ---------------------------------
msg ("What is your name?")
get input {
if (result = "HK") {
msg ("Ah, so your name is HK, this is so cool, I'm such a huge fan of yours!")
} else {
msg ("Oh, so your name is " + result + ". I don't know who you are, but it is nice to meet you.")
}
}
// ------------------------------
<object name="room">
</object>
<object name="player">
<attr name="parent" type="object">room</attr>
<attr name="alias" type="string">HK</attr>
<attr name="damage" type="int">100</attr>
<attr name="current_life" type="int">999</attr>
</object>
<object name="monster">
<attr name="parent" type="object">room</attr>
<attr name="alias" type="string">orc</attr>
<attr name="dead" type="boolean">false</attr>
<attr name="damage" type="int">50</attr>
<attr name="current_life" type="int">500</attr>
<attr name="fight" type="script">
fight_function
</attr>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>You can't fight that!</defaultexpression>
</verb>
<function name="fight_function">
if (monster.dead) {
msg ("The " + monster.alias + " is already dead, silly.")
} else {
monster.current_life = monster.current_life - player.damage
msg ("You attack the " + monster.alias + ", doing " + player.damage + " damage to it, leaving it with only " + monster.current_life + " life left.")
if (monster.current_life <= 0) {
monster.dead = true
msg ("You've not only damaged the " + monster.alias + ", but you've killed it.")
} else {
player.current_life = player.current_life - monster.damage
msg ("The " + monster.alias + " attacks you, doing " + monster.damage + " damage to you, leaving you with only " + player.current_life + " life left.")
if (player.current_life <= 0) {
msg ("The " + monster.alias + " has killed you.")
msg ("GAME OVER")
finish
}
}
}
</function>
--------------------------------------
quest's structure:
VARIABLES (3 Types):
-> Variables: some examples: result = "HK", handled = false, you_go_first = true, x = 10, y = "yes"
-> Attributes: some examples: game.state = 0, player.alias = "HK", orc.dead = false, game.x = 10, player.y = "yes", game.handled = true, game.you_go_first = false
-> Parameters: these are for Functions/Commands/etc