Help with handling the inventory

Verna I just downloaded the SCI Studio 3 and started with the tutorial and everythings been fine, until chapter 18. I did everything as it says but in the end of the chapter when I try to save the changes it gives me error saying; Undefined symbol "RoomScript". What can I do?
cloudee2 Hey Verna, that is one of the most vaguest questions possible, :-*

seriously though if you ever need help with specific coding questions then it would be greatly helpful and benefecial to everyone (especially you), if you would also post all corresponding code.

If I had to guess and only a guess, I would surmise that some of your brackets are out of place. :-\
Verna Well, then here's the whole room script. Hope someone can help me with this :P

/******************************************************************************
SCI Template Game
By Brian Provinciano
******************************************************************************
rm001.sc
Contains the first room of your game.
******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 1)
/******************************************************************************/
(use "main")
(use "controls")
(use "cycle")
(use "game")
(use "feature")
(use "obj")
(use "inv")
(use "door")
(use "jump")
(use "dpath")
/******************************************************************************/
(instance public rm001 of Rm
   (properties
      picture scriptNumber
      // Set up the rooms to go to/come from here
      north 0
      east 0
      south 0
      west 0
   )
   (method (init)
      // same in every script, starts things up
      (super:init())
      (self:setScript(RoomScript))
(if(not (send gEgo:has(INV_KEY)))
(theKey:
init()
setCycle(Fwd)
setPri(0) // an example of setting it to 0
ignoreActors()
)

      // Check which room ego came from and position it
      (switch(gPreviousRoomNumber)
/******************************************************
* Put the cases here for the rooms ego can come from *
******************************************************/ /*
(case north
            (send gEgo:
               posn(210 110)
               loop(2)
            )
         )*/
// Set up ego's position if it hasn't come from any room
         (default
            (send gEgo:
               posn(200 150)
               loop(2)
            )
         )
      )

      // Set up the ego
      SetUpEgo()
      (send gEgo:init())

/****************************************
* Set up the room's music to play here *
****************************************/ /*
      (send gTheMusic:
         prevSignal(0)
         stop()
         number(scriptNumber)
         loop(-1)
         play()
      )*/

/**************************************************
* Add the rest of your initialization stuff here *
**************************************************/
)
)
/******************************************************************************/
(instance RoomScript of Script
(properties) )

(method (changeState newState)
= state newState
(switch(state)(case 0
Print(
"State 0: waiting 20 cycles... tai sitten ei..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 1
Print(
"State 1: waiting 50 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 2
Print(
"State 2: waiting 10 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 3
Print(
"State 3: waiting 40 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 4
Print(
"State 4: this is the last cycle."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0 ))))

   (method (handleEvent pEvent)
(super:handleEvent(pEvent))

/*****************************************
* Handle the possible said phrases here *
*****************************************/
(if(Said('take/key'))
(if(send gEgo:has(INV_KEY))
Print("You already have it!")
)(else
(if(send gEgo:inRect(150 150 170 170))
Print("O.K.")
(send gEgo:get(INV_KEY))
(theKey:hide())
)(else
Print("You're not close enough!")
)
)
)
(if(Said('look [< around]'))
Print("You are in an empty room")
)
   )
)


/******************************************************************************/

(instance theKey of Prop
(properties
y 160
x 160
view 400
)
)
cloudee1 all right now we are getting somewhere.

first off where you have this:
(if(not (send gEgo:has(INV_KEY)))
(theKey:
init()
setCycle(Fwd)
setPri(0) // an example of setting it to 0
ignoreActors()
)

You are missing an out bracket to close off the if statement.

and this:
(instance RoomScript of Script
(properties) )

You have too many outbrackets, closing the roomscript.

change those and compile again, let me know if that fixes it.
Verna Yes! Now it worked ;D Thank you so much. I'll try to survive the rest of the tutorial by myself ::)
cloudee1 no problem, verna if you have any other questions there is usually somebody around who can help. and welcome to the "sci experience" :-*