Axe Software Forums
  Quest Developer Forum
  A bug!?!?! with properties


Author Topic:   A bug!?!?! with properties
HaDel posted 30-10-2002 23:24 GMT     
I am evaluating QDK and ASL for second night ;)
And fast enough I hit an obstacle, which I consider a bug.

I cannot make a "look" command to print a properties. But with user defined command ("snatch") it is ok.

Here I paste the script. Hopefully some of you can help me out:


' "The V Test"
' Created with QDK 3.11

!include <q3ext.qlb>

define game <The V Test>
asl-version <311>
start <lab-cave>
game author <HaDel>
game version <0.1>
game info <Created with QDK 3.11>
startscript {
property <vWitch; pName=#wname#>
msg <#wname# (wname)|n#vWitch:pName# (vWitch_pName)|n>
}
define variable <wname>
type string
value <Oynky>
display <!wname!>
end define
end define

define type <TChar>
pName = noname
end define

define synonyms
end define

define room <Lab-cave>
prefix <The>
look <It is a large lab-cave with heavy curtains. They are pulled now. An old woman is awaiting your move.>
command <snatch #text#> {
msg <You try to snatch #vWitch:pName#'s #text# and ...|n|n#vWitch:pName#'s #text# is |n#vWitch:hat#>
if real <vWitch> and property <vWitch; pFemale> and ( #vWitch:hat# = old ) then msg <You snatch#vWitch:pName#'s #vWitch:hat# hat> else msg <... she ain't giving it that easy...>
}
command <kiss #kissedobject#> doaction <vWitch; actionkiss>

define object <vWitch>
alias <#wname#>
look msg <Please, meet #vWitch:pName#.|n|nShe has:|na #vWitch:hat# hat |nand|na #vWitch:PC# PC.|n|n/We expect you to "snatch hat" or "snatch PC"/>
prefix <oldish>
gender <she>
properties <hat=new; computer=old>
end define

end define

define procedure <actionkiss>
msg <You kissed her $parameter(1)$. Ok, Ok... You are on drugs... or?>

end define

define text <intro>

end define

define text <win>

end define

define text <lose>

end define


Computer Whizz posted 31-10-2002 02:10 GMT          
If you're talking about the "computer" bit, then your problem is as so:
quote:
look msg <Please, meet #vWitch:pName#.|n|nShe has:|na #vWitch:hat# hat |nand|na #vWitch:PC#

While the property is:
quote:
properties <hat=new; computer=old>

See the error? You have it as computer in the properties but PC in the look block...

Hope this sorts your problem - other than that I see no problems...

Computer Whizz

HaDel posted 31-10-2002 06:43 GMT          
OK, this is a minor problem... fixed.
Now, please look at this output from the
<b>look msg </b>
____________________________________
>look Oynky
> look oynky
Please, meet !.

She has:
a ! hat
and
a ! PC.
____________________________________

Absolutely messed!

Now the custom command:
____________________________________
> snatch hat
You try to snatch Oynky's hat and ...

Oynky's hat is
new
... she ain't giving it that easy...
____________________________________

Now the <b>#vWitch:pName#'s #text# </b> is printed OK -> <b>Oynky's hat</b>, while before it resulted in <b>!</b>

Alex posted 31-10-2002 22:45 GMT          
To be honest I'm not entire sure what's supposed to be going on here, but if you look in the ASL Log window you will see:

ERROR: Object 'vWitch' has no property 'PC'

which is the cause of the "!" in the "look" description (on my computer there's only one - are you running the latest version of Quest... or perhaps this is a bug I've fixed in a not-yet-released version). The "look" description according to my current build of Quest is:

quote:

> look at oynky
Please, meet Oynky.

She has:
a new hat
and
a ! PC.

/We expect you to "snatch hat" or "snatch PC"/


HaDel posted 01-11-2002 00:01 GMT          
I got it 2 days ago from this site.
I guess it isthe latest v.3.11...

If it is fixed - fine! I will wait for the next release, or simply ignorte it for now...

Thanks!