Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Twentylevel

Pages: [1]
1
Mega Tokyo SCI Archive / Re:Parentheses
« on: March 01, 2003, 09:58:39 PM »
Ok, I'm completely on top of boolean expressions.  I understand this.  My problem is that the brackets seem to be random.  
I copied Eigens code exactly, and until I added a couple random brackets at the end of the code it didn't work properly.  
Maybe I'm not getting it, but everytime I do something from the tutorial, I get a "bracket" error.  I have been cut/pasting directly from online and every time I have an error.  
The code itself is simple, it's the damn brackets that keep screwing me up.  I'm really pounding my head here!   :-\

2
Mega Tokyo SCI Archive / Re:Parentheses
« on: March 01, 2003, 01:45:30 PM »
Hmmm.... It compiled and ran, but that set of code made it pop up "You're in an empty room" over and over...  
Also, what exactly did I do wrong??

Oh, and another thing:  I've been building a room and after awhile it gives me an error message.  When I look through my draw list, I see that it has "end of pic" a few draws back followed some random draws (usually a tiny line or line) and then it has the real "end of pic"  I tried rebooting, but I it did it again.  Is this a common problem?  I'm running Win98 - I see from past msgs that Win98 can cause probs.

Thanks!  

3
Mega Tokyo SCI Archive / Re:Parentheses
« on: March 01, 2003, 11:11:52 AM »
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"))
 )

  )



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


4
Mega Tokyo SCI Archive / Parentheses
« on: March 01, 2003, 12:02:49 AM »
OK.  I'm starting to go crazy here.  I have cut and pasted DIRECTLY from the tutorial into my roomscript.  EVERY time it gives me a "bracket expected" on some random place.  I have spent all day with this and I'm starting to go crazy.  
I have done everything exactly by the tutorial, and everytime I get this message.  I've had limited success with random deleting/adding brackets.  I even went through bracket by bracket and labeled them in an attempt to find the problem.  Every one matches another.  I will post my code if need be.  But this is a problem on every page of the tutorial.

How do I debug these brackets!?!!?

Pages: [1]

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.052 seconds with 20 queries.