Remove Object Bug in Extended Wearables Library
Dcoder
16 Nov 2016, 20:41I am referencing a previous post:
https://textadventures.co.uk/forum/samples/topic/2901/extended-wearables-library
The user Chase created an Extended Wearables Library to replace the Clothing Library. I added it to my game, but found a glaring bug in it -- whenever you try to remove an object that is non-wearable (whether the object is in your inventory or in the same room), Quest v5.6.3 gives you an error msg:
Error running script: Error compiling expression 'not object.parent = player or not object.worn or not object.removeable': NotElement: Operation not defined for type 'Object'
Scintillating, huh? The user Silver originally brought this up in the referenced post above (about a third of the way down in the original posting). Two solutions were offered, but neither worked for me:
-
Replace the 'player' object with 'game.pov' -- whenever I tried to change the name of the 'player' object to anything with a '.' in it (with a period in it), I'd get the error msg 'Invalid element name'.
-
The user Pixie seemed to pinpoint the problem (about halfway down the original posting). He said:
I had a look at the Wearables library. The problem is in the first line of the DoRemove function, which assumes two attributes exist. If you change it to this, it should work properly:
if (not object.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable")) {
I tried this too, replacing the first line of code with Pixie's replacement code. I even experimented with putting Pixie's code in different places and editing it (though I am NOT a coder), but to no avail. Whenever the Quest program gets to Pixie's code, it spits out this error msg:
Error running script: Error compiling expression 'not object.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable")': Variable does not refer to an object: 'object'
I wonder if Pixie's code doesn't work because I'm using the latest version of Quest (5.6.3)? I'm sure others who are also using this Extended Wearables Library are also encountering the same problem. Any solutions/suggestions would be appreciated. Thanks in advance.

Anonynn
17 Nov 2016, 02:12You'd be better off using Pixie's Clothing Library. It's more up-to-date and easier to manage.
https://github.com/ThePix/quest/wiki
Dcoder
17 Nov 2016, 06:19Ok, I'll look at that. Thank you : )