Suppress error messages?

SkunkHunt
02 Apr 2012, 06:43
Is there a way to suppress error messages?

I have the following code working ...

<onswitchoff type="script">
set (lit torch, "name", "unlit torch")
</onswitchoff>
<onswitchon type="script">
set (unlit torch, "name", "lit torch")
</onswitchon>


And when I type "turn off torch" or "turn on torch" this is what I get:

> turn off torch
You put out the torch.
Error running script: Cannot change name of element when not in Edit mode



Is it true that I can't change the name attribute? how come it is letting me change it anyway and throwing this error?

Is it possible to suppress this error if the Quest is actually allowing me to change the name of the torch object?

Pertex
02 Apr 2012, 07:17
You can't change the name-attribute which is the unique id of an object. Try to change the alias-attribute

SkunkHunt
02 Apr 2012, 08:09
Pertex wrote:You can't change the name-attribute which is the unique id of an object. Try to change the alias-attribute


Yeah you know I did this instead and it worked fine.

So I suppose I don't need to suppress those error messages.