TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
Container Object error I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Container Object error I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Container Object error I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Container Object error I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Container Object error I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Container Object error I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Container Object error I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Container Object error I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Container Object error I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 Container Object error

View previous topic View next topic Go down 
AuthorMessage
kaele7
Novice Adventurer


Number of posts : 13
Adventure Points : 0
Registration date : 2008-10-08

Container Object error Empty
PostSubject: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 3:06 am

I'm trying to build a universal open container response script and this is what I have:

[start]open %objn1%#closedobjn1[acts]openobjn1#cmessYou slowly open the %objn1%.#lookinobj#else#openedobjn1[acts]cmessIt's already opened![end]

I searched through the language file and openobjn1 is in there but TAB keeps giving me an error saying it's invalid. I can get it to work just fine if I gear it toward one specific object, but I plan on having 100+ rooms with many chests and containers. Any help would be great.
Back to top Go down
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 2:40 pm

kaele7 wrote:

[start]open %objn1%#closedobjn1[acts]openobjn1#cmessYou slowly open the %objn1%.#lookinobj#else#openedobjn1[acts]cmessIt's already opened![end]

Hi kaele7 and welcome to TAB forum. Thanks for your feedback. I've checked and your code is almost perfect. You are right. Somehow the "openobjn1", "openobjn2", "closeobjn1" and "closeobjn2" ACTIONS have gone MISSING!!

However, not to worry because I have added them now and re-posted a new release 44.1 just now.

http://tab.thinbasic.com/

Please download that (remember to save your database somewhere safe before deleting the older TAB package)

Then is two slight adjustments to your code:

[start]open %objn1%#closedobjn1[acts]openobjn1#cmessYou slowly open the %objn1%.#objn2=objn1#lookinobj#else#openobjn1[acts]cmessIt's already opened![end]

"lookinobj" is a special default action made for TAB that only works correctly on the objn2 parser variable.

Therefore to have it respond correctly you need to do a "objn2=objn1" action before calling "lookinobj" above so that objn2 holds the number of the correct object noun.

conditions "openobjn1" and "closedobjn1" is the correct syntax.

Finally, I would just mention to read the thread about container objects for more info and also probably best if you have your chests and containers use differentiated nouns. This is because TAB has difficulty handling more than one object with the same noun name. You can do it but it requires extra code to implement - but its advisable, and it will certainly cause less trouble to have each object use a different noun.
eg: box, chest, cabinet, drawer, basket, wardrobe etc..

Thanks again for your report and let me know if it now works for you.

Best wishes,
catventure.
Back to top Go down
https://adventure.forumotion.com
kaele7
Novice Adventurer


Number of posts : 13
Adventure Points : 0
Registration date : 2008-10-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 4:15 pm

It works beautifully but I'm confused about the openobjn1 condition. I'm trying to develop the code to close the obj and I don't want it to run if the wardrobe is already opened. openobjn1 works as a condition but the closeobjn1 action doesn't seem to actually close the wardrobe.

[start]close %objn1%#openobjn1[acts]closeobjn1#cmessYou gently close the %objn1%.#else#closedobjn1[acts]cmessIt's closed already![end]
Back to top Go down
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 4:51 pm

kaele7 wrote:

[start]close %objn1%#openobjn1[acts]closeobjn1#cmessYou gently close the %objn1%.#else#closedobjn1[acts]cmessIt's closed already![end]

Hi kaele7,

Hmm! Embarassed
That's because in my haste I made a stupid coding error with "closeobjn1"
action.!!!

Your code is perfectly correct though. I have to be *very* careful when making changes...

Please bear with me whilst I fix it and upload again. Apologies. Please watch for new forum announcement!

catventure (Phil)
Back to top Go down
https://adventure.forumotion.com
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 5:08 pm

OK. Fixed it.

You might want to consider using the below CONDITIONS which check if the specific object actually IS a container object first...

objn1container - is objn1 a container?
objn2container
objn1notcontainer - is objn1 not a container?
objn2notcontainer

[start]open %objn1%#objn1container#closedobjn1[acts]openobjn1#cmessYou slowly open the %objn1%.#objn2=objn1#lookinobj#else#objn1container#openobjn1[acts]cmessIt's already opened![end]

[start]close %objn1%#objn1container#openobjn1[acts]closeobjn1#cmessYou gently close the %objn1%.#else#objn1container#closedobjn1[acts]cmessIt's closed already![end]


Release 44.2 uploaded.

Please download from:

http://tab.thinbasic.com/

or use TAB Online Updater on Editor Main Window.

Thanks for your feedback report. I'm glad it is OK now.
Sorry you had trouble.

What sort of game you making Question

Regards,
Phil.


Last edited by catventure on Wed Oct 08, 2008 5:21 pm; edited 3 times in total
Back to top Go down
https://adventure.forumotion.com
kaele7
Novice Adventurer


Number of posts : 13
Adventure Points : 0
Registration date : 2008-10-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 5:16 pm

Have you heard of World of Warcraft? It's a game based in that universe. It begins with a horrific dream of Northrend and of the evil there, and subsequent story of how your character works his/her way to discover the mystery of it all and helps to thwart the danger.
Back to top Go down
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitimeWed Oct 08, 2008 5:27 pm

World of Warcraft... Interesting material for an IF game. Surprised

Haven't actually played that. Looks good from what I can see.

Don't hesitate to post if you need any further clarification or advise etc.

Good Luck,
Phil.

Since the bug is fixed I will lock this topic.
Back to top Go down
https://adventure.forumotion.com
Sponsored content




Container Object error Empty
PostSubject: Re: Container Object error   Container Object error I_icon_minitime

Back to top Go down
 

Container Object error

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: Bug Reports-
Jump to: