Really, I understand that every function needs a bracket. I'm just not able to find the problem. Maybe I'm not up to speed on these functions yet. Why does super:init() have a '()' after it? Sometimes I'm not sure what function goes with what. Like I said, I'm reduced to randomly placing brackets and deleting them. I'm not saying your compiler has problems, I'm just saying that I do.
Here's my code, there's probably alot of garbage in there because of my attempts to root out the cause:
/******************************************************************************
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)
// 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(194 101)
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 (doit)
(super (doit())
Display (
"Hello World"
dsCOORD 0 0
dsCOLOR RANDOM(0 15)
dsBACKGROUND clBLACK)
)
)
/*****************************************
* Handle the possible said phrases here *
*****************************************/
(method (handleEvent pEvent)
(super:handleEvent(pEvent)
(if(Said('look')
Print("You are in an empty room"))
)
)
/******************************************************************************/