6 Replies Latest reply on Mar 11, 2015 4:12 PM by Imposturous

    I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code

    Imposturous Level 1

      The game is a word search game in an advanced lingo book and the lingo code is using [cc] which is coming up as a code fault.  What is wrong or is this use of [cc] obsolete?  And if so, how can it be corrected?  Thank you.

       

      on getPropertyDescriptionList me

        list = [:]

       

        -- the text member with the words in it

        addProp list, #pWordSource,[cc]

          [#comment: "Word Source",[cc]

           #format: #text,[cc]

           #default: VOID]

       

        addProp list, #pEndGameFrame,[cc]

          [#comment: "End Game Frame",[cc]

           #format: #marker,[cc]

           #default: #next]

       

        return list

      end

        • 1. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
          James Newton, ACP Level 3

          [cc] here stands for "continuation character". Prior to Director 8, this was ¬ and from Director 8 onwards it was \ (immediately followed by a carriage return). Assuming that you are using a 21st century version of Director, this should work for you:

           

          on getPropertyDescriptionList me

            list = [:]

           

            -- the text member with the words in it

            addProp list, #pWordSource,\

              [#comment: "Word Source",\

               #format: #text,\

               #default: VOID]

           

            addProp list, #pEndGameFrame,\

              [#comment: "End Game Frame",\

               #format: #marker,\

               #default: #next]

           

            return list

          end

          • 2. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
            Imposturous Level 1

            Hello, thanks for that as it cleared that problem but the problem hasn't gone away.  I tried playing with this all day but to no avail.  I'm now getting this error:

             

            Script Error:  Incorrect behavior initializer.  (Periods are not allowed in symbols)

             

            [#pWordSource:<void>, #pEndGameFrame: #next]

             

            The code is now: (and I have no periods in this lingo)

             

            on getPropertyDescriptionList me

             

              list = [:]

             

              -- the text member with the words in it

             

              addProp list, #pWordSource,\

            [#comment: "Word Source",\

            #format: #text,\

            #default: VOID]

             

            addProp list, #pEndGameFrame,\

            [#comment:"End Game Frame",\

            #format: #marker,\

            #default: #next])

             

              return list

             

            end

             

            I tried doing this: 

             

              addProp list, #pWordSource,\

            ([#comment: "Word Source",\

            #format: #text,\

            #default: VOID])

             

            addProp list, #pEndGameFrame,\

            ([#comment:"End Game Frame",\

            #format: #marker,\

            #default: #next])

             

            but it produces the same error as above.

             

            The other error I'm getting is expecting cast member for (but I don't have a cast member with the name pWordSource and I tried putting the actual name of cast member and the cast member number but both didn't work either):

             

            -- get words from text member

            on getWords me

              text = member(pWordSource).text

            • 3. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
              Imposturous Level 1

              UPDATE:  I put in a different cast member number (as I have 2 sets of text) and it is now working!!!!

               

              Thank you.

              • 4. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
                Imposturous Level 1

                Hello again

                 

                Unfortunately I'm still getting this error when I press play for this game.  Though the game is working, this error persists coming up whenever I press play in Director 12.  Do you know what the problem can be?  I don't see any periods in the script.  Thank you.

                 

                Script Error:  Incorrect behavior initializer.  (Periods are not allowed in symbols)

                 

                [#pWordSource:<void>, #pEndGameFrame: #next]

                 

                The code is now: (and I have no periods in this lingo)

                 

                on getPropertyDescriptionList me

                 

                  list = [:]

                 

                  -- the text member with the words in it

                 

                  addProp list, #pWordSource,\

                [#comment: "Word Source",\

                #format: #text,\

                #default: VOID]

                 

                addProp list, #pEndGameFrame,\

                [#comment:"End Game Frame",\

                #format: #marker,\

                #default: #next])

                 

                  return list

                 

                end

                • 5. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
                  James Newton, ACP Level 3

                  I have made the following changes:

                  • Replace...

                             #default: VOID]

                         with

                             #default: ""]

                  • Replace...

                            #default: #next])

                         with

                             #default: #next]



                  on getPropertyDescriptionList me

                    list = [:]

                   

                    -- the text member with the words in it

                    addProp list, #pWordSource,\

                    [#comment: "Word Source",\

                  #format: #text,\

                  #default: ""]

                   

                    addProp list, #pEndGameFrame,\

                  [#comment:"End Game Frame",\

                  #format: #marker,\

                  #default: #next]

                   

                    return list

                  end

                  • 6. Re: I am using a book on lingo puzzles and Director 12 doesn't like using [cc] in the code
                    Imposturous Level 1

                    Dear James

                     

                    That small change in the lingo made the error go away.....I'm very grateful.  No errors are coming up now.  Thank you.