Problem in tutorial chapter 15

Robin_Gravel The ego can't change the room from east.

Here my codes:

room 1:

/******************************************************************************
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")
/******************************************************************************/
(instance public rm001 of Rm
   (properties
      picture scriptNumber
      // Set up the rooms to go to/come from here
      north 0
      east 2
      south 0
      west 0
   )
   (method (init)
      // same in every script, starts things up
      (super:init())
      (self:setScript(RoomScript))
      
      // 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(150 130)
               loop(1)
            )
         )
      )
      
      // 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 (handleEvent pEvent)
(super:handleEvent(pEvent))

/*****************************************
* Handle the possible said phrases here *
*****************************************/
(if(Said('look'))
Print("You are in room 1")
)
   )
)
/******************************************************************************/
Robin_Gravel Room 2:

(use "main")
(use "controls")
(use "cycle")
(use "game")
(use "feature")
(use "obj")
(use "inv")
(use "door")
(use "jump")
/******************************************************************************/
(instance public rm002 of Rm
   (properties
      picture scriptNumber
      // Set up the rooms to go to/come from here
      north 0
      east 0
      south 0
      west 1
   )
   (method (init)
      // same in every script, starts things up
      (super:init())
      (self:setScript(RoomScript))

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

      // 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 (handleEvent pEvent)
(super:handleEvent(pEvent))

/*****************************************
* Handle the possible said phrases here *
*****************************************/
(if(Said('look'))
Print("You are in room 2")
)
   )
)
/******************************************************************************/

Did I miss something?

Robin Gravel
Robin_Gravel Finally I solved my problems by deleting script files on the game directory.

Making src directory, copy any sc and sh files in src directory. Deleting sc and sh files in the game directory.

Recompiling scripts using sc and sh files from src directory. My head hurt.

Yes. Another DG game is coming soon in sci.

Robin Gravel
Brian_Provinciano For one thing, if you add a class, you must add it to the end of the script, you can't insert it at the beginning. It will mess up the class system.

If you have any of these problems, just click on the menu [B]Compile > Compile All Scripts[/B].

If you have a room 2, you must make sure the top line reads:

(script 2)

For room 3, the top line must read (script 3), etc.

Instead of creating a blank script and copying script.001, use the menu File > New > Room Script.

Good luck!
Joe Can't you place the instances between the two script and room instances?
Brian_Provinciano Yes. You can rearrange instances within your scripts without problems (unless you have more than one public instance, which I doubt anyone will).