It seemed so easy.....
francisstokes
28 Jun 2005, 15:47I know that many people will say "typelib" but i was woking on a sort of backpack system (mainly because i needed one and typelib has too much other stuff thats not relevent) but i can't seem to make it work, even though i've checked the code over and over.Here it is:-
!library
!asl-version <350>
!name <The Backpack>
!version <1.0>
!author <Francis Stokes>
!
! This is to give a storage option
! to a game.....its really for my game
! but i made it into a library so people
! can use it if they want.
addto game
'=========================================
'= The backpack!!!
'=========================================
define room <dummy.backpack>
look <How can you be inside your own backpack?!?!>
end define
'=========================================
'= The commands!!!!!
'=========================================
command <put #@b.p.in# in backpack> do <object.in>
command <take out #@b.p.out#> do <object.out>
'==========================================
'= The Great Check!!!
'==========================================
define procedure <object.in>
if got <backpack> and got <#b.p.in#> then move <#@b.p.in#; dummy.backpack>
end define
paul_one
28 Jun 2005, 20:16It should be '!addto game' not 'addto game'.
The !addto is a block, just like define game/define room. The meaning of "!addto game" is in the quest help files. Search for library or (perhaps) !addto.
You're also missing an '!end'.
... So that's why it's 'not working'.
Or more accurately, "not adding commands, rooms, or procedures to the game".
Even more of a puzzler - why didn't you look in the help files?
The !addto is a block, just like define game/define room. The meaning of "!addto game" is in the quest help files. Search for library or (perhaps) !addto.
You're also missing an '!end'.
... So that's why it's 'not working'.
Or more accurately, "not adding commands, rooms, or procedures to the game".
Even more of a puzzler - why didn't you look in the help files?
francisstokes
28 Jun 2005, 21:15Umm i did look in the help files, but i obviously over-looked that command.
Just another small problem.Ive fixed the !addto game and now the log file is telling me that i don't have a procedure call object.in when i clearly do:
Just another small problem.Ive fixed the !addto game and now the log file is telling me that i don't have a procedure call object.in when i clearly do:
define procedure <object.in>
if got <backpack> and got <#b.p.in#> then move <#b.p.in#; dummy.backpack>
end define
MaDbRiT
29 Jun 2005, 08:14Francis wrote
What that tells me is that you is that Quest can't FIND your procedure, if you've written it (which you have) then it is in the wrong place.
This leads me to think you have added your '!end' of the addto game in the wrong place and are therefore including things that don't belong in the gameblock.
You've certainly got your commands and procedure/ room definitions the wrong way round sequence wise as currently written.
Of your code as given, only the two "command <x>" lines belong in the addto game block. The procedure and room definition must be OUTSIDE of the !addto game block and AFTER the !end.
Something like:
BTW You still need to do a lot of work on this, it doesn't tell the player what is happening if it successful OR if it is not successful!
Anyway, I've corrected the way you wrote the lib - see if that helps.
Al (MaDbRiT)
another small problem.Ive fixed the !addto game and now the log file is telling me that i don't have a procedure call object.in when i clearly do:
What that tells me is that you is that Quest can't FIND your procedure, if you've written it (which you have) then it is in the wrong place.
This leads me to think you have added your '!end' of the addto game in the wrong place and are therefore including things that don't belong in the gameblock.
You've certainly got your commands and procedure/ room definitions the wrong way round sequence wise as currently written.
Of your code as given, only the two "command <x>" lines belong in the addto game block. The procedure and room definition must be OUTSIDE of the !addto game block and AFTER the !end.
Something like:
!library
!asl-version <350>
!name <The Backpack>
!version <1.0>
!author <Francis Stokes / amended by MaDbRiT>
!
! This is to give a storage option
! to a game.....its really for my game
! but i made it into a library so people
! can use it if they want.
!addto game
'=========================================
'= The commands!!!!!
'=========================================
command <put #@b.p.in# in backpack> do <object.in>
command <take out #@b.p.out#> do <object.out>
!end
'=========================================
'= The backpack!!!
'=========================================
define room <dummy.backpack>
look <How can you be inside your own backpack?!?!>
end define
'==========================================
'= The Great Check!!!
'==========================================
define procedure <object.in>
if got <backpack> and got <#b.p.in#> then move <#@b.p.in#; dummy.backpack>
end define
BTW You still need to do a lot of work on this, it doesn't tell the player what is happening if it successful OR if it is not successful!
Anyway, I've corrected the way you wrote the lib - see if that helps.
Al (MaDbRiT)
francisstokes
29 Jun 2005, 21:19Thanks MaDbRiT, i didn't relise that i was putting thigs in the wrong place.
I'm planing to do more work on the library such as telling the user the information they need to know; but i wanted to lay out the structure of the library first.
BTW i wasn't trying to put your library down...I think its great but its just not what i needed for my game
.

I'm planing to do more work on the library such as telling the user the information they need to know; but i wanted to lay out the structure of the library first.

