I made the game crash D:

afrotoast
okay so I have a container, where under certain circumstances, it reveals a fake bottom to the drawer. I had it set up so when the conditions are met, it would move the object "fake_bottom" into the drawer, and when you look at it, it changes the object from scenery to not scenery.

I managed to circumvent the problem by just making it not scenery right from the beginning, and the game is playable, but before I did that, i noticed that adding the line:

fake_bottom.scenery = "False"


to the "look at" script caused the game to completely crash when looking at the object. The whole "play" interface would freeze up, even though you could still interact with quest. You could stop the game but if you tried to start it again it'll load up the same frozen state it was in.

Does anyone know why this is happening? This is really more for my own curiosity and learning than anything else. I've already sorted out the issue from a player point of view.

It just seems strange because usually if i make a mistake in the code it'll just return an error or not do anything. This is the first time the whole thing's just... failed.

Pertex
Strange, when using
fake_bottom.scenery = "False"
an errormessage should appear.
Try
fake_bottom.scenery = false

The scenery attribute is boolean not string.

HegemonKhan
just to expand a bit on Pertex' post:

any Value encased in double quotes is a String (literal) Value, for example (the 'alias' Attribute is a String Attribute, so, String = String: no error): player.alias = "HK"

(the 'name' Attribute is a String Attribute, so: player.name = "player", whereas, for example, player.alias = "HK". The 'name' String Attribute gives the Object, Function, Etc Element, it's ID, as can be seen. The 'name' String Attribute is the ID for quest's Elements, so quest can differentiate between the different Elements: Objects, Functions, Etc. For example, two people can have the same name, in quest, this would be the: alias, but no two people have the same ID such as their DNA, Iris-eye pattern, finger print, etc, and in quest the ID is the 'name' String Attribute)

or another example (using what would be a String Attribute and a String Value): npc1.greeting = "Hi, how are you? My name is John, what is your name?"

any Value NOT encased in double quotes is an Object (with a few exceptions that I'll tell about after --- further below), for example:

(the 'left_hand' and 'right_hand' are Object Attributes: an Attribute that holds an Object's name, and thus "pointing-getting" that Object for use, but the actual Object's location doesn't change, it's not "physically" moved to the Attribute or nor to the parent Object of that Attribute, as you can see below)

player.left_hand = shield
player.right_hand = sword

<object name="player">
<attr name="left_hand" type="object">shield</attr>
<attr name="left_hand" type="object">sword</attr>
</object>

<object name="sword">
</object>

<object name="shield">
</object>


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

so, what are the exceptions?

well, at least two of them (I don't know if there's any more off-hand --- I can't think of any at the moment):

'true' and 'false', as these are reserved Values for the Boolean Attribute, for some examples:

orc.dead = false
orc.dead = true
player.flying = false
player.flying = true
player.poisoned = false
player.poisoned = true

I'm not sure if these are the correct syntax and/or terms-words for these built-in booleans (meh):

tv.switchedon = false
tv.switchedon = true
door.isopen = false
door.isopen = true

----

(so, don't name any Object as 'true' or 'false', lol --- either you'll get errors, or you'll remove-override the Boolean Attribute functionality from your game)

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums