Axe Software Forums
  Quest Developer Forum
  Missing } - unable to open file


Author Topic:   Missing } - unable to open file
rgtnismo posted 19-09-2001 05:42 GMT     
i'm using QDK/Quest 3.01 and it's probably me doing something wrong. I've tried it a few times now and can't get it to work. In my scenario i'm trying to make a TV that will stay on when i leave the room, so i used two items for the TV and a few conditions. this is my actual coding: command <use Television> if here <TVOFF> then {if ask <Turn Television ON?> then {
show <TVON>
hide <TVOFF>
msg <You Turn the Television ON.>
choose <Television>
}

define object <TVOFF>
alias <Television>
invisible
end define

define object <TVON>
alias <Television>
hidden
invisible
end define
and there's a Television menu aswell, now if i save that and try to open it with quest it gives an error Missing } - unable to open file and then another unable to open C:\etc. the directory of the game, and if i close QDK and try and load the game again QDK does the same as Quest. Sorry for such a long msg.

Russell posted 19-09-2001 14:16 GMT          
You'll have to open the .asl file with a text editor such as notepad or wordpad and put the second bracket in yourself after choose <Television> I think Alex is working on finding this bug.
Computer Whizz posted 19-09-2001 22:13 GMT          
OK..... now below I will use _ as a space character!
I am doing this since it is easier to read with tabs/spaces!!

command <use Television> if here <TVOFF> then {
__if ask <Turn Television ON?> then {
____show <TVON>
____hide <TVOFF>
____msg <You Turn the Television ON.>
____choose <Television>
____} 'Now this closes the inner "IF" statement!
__} 'This closes the outer IF.

You should put an ELSE here saying "The TV is not here." or something like that!

Computer Whizz

Alex posted 19-09-2001 23:05 GMT          
If you remove the { before "if ask <Turn Television ON?>" then all will be fine, and if you save the game in QDK again it will also be OK.

It's an irritating little bug which I've squashed in QDK 3.02, coming soon....