Help Needed Checking Repetitive Details on Puzzle

This is a game that works more than half the time, for what it's worth, but I am really upset, because I need it for the middle of a greater narrative based game, and it doesn't work every single time, which I really need it to do. I haven't finished the rest of the game, but it is difficult for me to concentrate knowing this imperfect script might never be corrected. Can anyone feel like spending the time looking through the x#y# objects acting as placeholders for .tint and point out which one is out of order or misspelled or just not correct? You can use the script, just let me know if you find the inconsistency or mistake(s) I made so that I can add this to my own game and it will play every time without sometimes causing several bricks to disappear without being replaced, because it might not be my x#y#. It might just be one omission of some other kind, but I am tired of looking at it. Please let me know...


  

Click to expand!

  
    
  

  

Click to expand!

      msg ("___ . {object:Post1}. .{object:Post2}. .{object:Post3}. .{object:Post4} . ___")
    
    OutputTextNoBr ("{object:Row1}")
    if (x0y3.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x0y3.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x0y3.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x0y3.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x1y3.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x1y3.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x1y3.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x1y3.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x2y3.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x2y3.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x2y3.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x2y3.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x3y3.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x3y3.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x3y3.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x3y3.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    msg ("")
    OutputTextNoBr ("{object:Row2}")
    if (x0y2.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x0y2.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x0y2.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x0y2.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x1y2.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x1y2.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x1y2.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x1y2.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x2y2.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x2y2.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x2y2.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x2y2.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x3y2.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x3y2.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x3y2.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x3y2.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    msg ("")
    OutputTextNoBr ("{object:Row3}")
    if (x0y1.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x0y1.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x0y1.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x0y1.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x1y1.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x1y1.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x1y1.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x1y1.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x2y1.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x2y1.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x2y1.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x2y1.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x3y1.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x3y1.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x3y1.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x3y1.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    msg ("")
    OutputTextNoBr ("{object:Row4}")
    if (x0y0.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x0y0.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x0y0.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x0y0.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x1y0.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x1y0.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x1y0.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x1y0.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x2y0.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x2y0.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x2y0.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x2y0.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    if (x3y0.tint = 0) {
      OutputTextNoBr ("{img:Blankmini.png}")
    }
    else if (x3y0.tint = 1) {
      OutputTextNoBr ("{img:3dr.jpg}")
    }
    else if (x3y0.tint = 2) {
      OutputTextNoBr ("{img:3db.jpg}")
    }
    else if (x3y0.tint = 3) {
      OutputTextNoBr ("{img:3dy.jpg}")
    }
    msg ("")
    if (GetBoolean(matchbox, "ZERO")) {
      play sound ("bookpage.mp3", true, false)
      SetObjectFlagOff (matchbox, "ZERO")
      MatchUpset
    }
    else if (GetBoolean(matchbox, "SHOW")) {
      SetObjectFlagOff (matchbox, "SHOW")
      play sound ("egghatch.wav", true, false)
      MatchBoxStep
    }

        MakeObjectVisible (Row4)
        MakeObjectVisible (Row3)
        MakeObjectVisible (Row2)
        MakeObjectVisible (Row1)
        MakeObjectVisible (Post1)
        MakeObjectVisible (Post2)
        MakeObjectVisible (Post3)
        MakeObjectVisible (Post4)
        play sound ("egghatch.wav", false, false)
      }

  ]]>


Click to expand!

  

Click to expand!

  

Click to expand!

  


Click to expand!

  

Click to expand!

  


You need to surround the code with ``` to prevent the forum mangling it. Sometimes this breaks oddly if it's in a line immediately following a HTML tag; so I usually put a brief one-line explanation between the <details> or <summary> and a block of code.

(Or paste it into a text editor first and search-and-replace the < to &lt;. Or Put it in a pastebin and give us a link)


SetUp is in the second post. The game always sets up perfectly until the first move might or might not cause some blocks to appear as 0, even though they would have been inidentical after that move. This is the object with its verbs.

Click to expand!

 <object name="matchbox">       <inherit name="editor_object" />       <inherit name="surface" />       <alias>Fidget Gadget</alias>       <take />       <inventoryverbs type="stringlist">         <value>Examine</value>         <value>Drop</value>       </inventoryverbs>       <displayverbs type="stringlist">         <value>Examine</value>         <value>Take</value>       </displayverbs>       <mem type="int">0</mem>       <feature_container />       <contentsprefix type="string"></contentsprefix>       <quit type="script">         matchbox.alias = "Fidget Gadget"         SetFontSize (12)         ClearScreen         MakeObjectInvisible (Row1)         MakeObjectInvisible (Row2)         MakeObjectInvisible (Row3)         MakeObjectInvisible (Row4)         request (Show, "Panes")         request (Show, "Command")       </quit>       <look type="script">         msg ("")       </look>       <play type="script">         matchbox.alias = "MatchBox"         request (Hide, "Panes")         request (Hide, "Command")         SetFontSize (24)         x0y0.tint = GetRandomInt (1,3)         x0y1.tint = GetRandomInt (1,3)         x0y2.tint = GetRandomInt (1,3)         x0y3.tint = GetRandomInt (1,3)         x1y0.tint = GetRandomInt (1,3)         x1y1.tint = GetRandomInt (1,3)         x1y2.tint = GetRandomInt (1,3)         x1y3.tint = GetRandomInt (1,3)         x2y0.tint = GetRandomInt (1,3)         x2y1.tint = GetRandomInt (1,3)         x2y2.tint = GetRandomInt (1,3)         x2y3.tint = GetRandomInt (1,3)         x3y0.tint = GetRandomInt (1,3)         x3y1.tint = GetRandomInt (1,3)         x3y2.tint = GetRandomInt (1,3)         x3y3.tint = GetRandomInt (1,3)         MatchBoxStep       </play>       <object name="Panel">         <inherit name="editor_object" />         <object name="x3y3">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x3y2">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x3y1">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x3y0">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x2y3">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x2y2">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x2y1">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x2y0">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x1y3">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x1y2">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x1y1">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x1y0">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x0y3">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x0y2">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x0y1">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>         <object name="x0y0">           <inherit name="editor_object" />           <tint type="int">0</tint>           <displayverbs type="stringlist" />           <inventoryverbs type="stringlist" />         </object>       </object>       <object name="Row1">         <inherit name="editor_object" />         <inventoryverbs type="stringlist" />         <displayverbs type="stringlist" />         <mem type="int">0</mem>         <visible type="boolean">false</visible>         <lefttoright type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row1.mem = x3y3.tint           x3y3.tint = x2y3.tint           x2y3.tint = x1y3.tint           x1y3.tint = x0y3.tint           x0y3.tint = Row1.mem           MatchBoxCheckHor         </lefttoright>         <righttoleft type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row1.mem = x0y3.tint           x0y3.tint = x1y3.tint           x1y3.tint = x2y3.tint           x2y3.tint = x3y3.tint           x3y3.tint = Row1.mem           MatchBoxCheckHor         </righttoleft>       </object>       <object name="Row2">         <inherit name="editor_object" />         <inventoryverbs type="stringlist" />         <displayverbs type="stringlist" />         <mem type="int">0</mem>         <visible type="boolean">false</visible>         <lefttoright type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row2.mem = x3y2.tint           x3y2.tint = x2y2.tint           x2y2.tint = x1y2.tint           x1y2.tint = x0y2.tint           x0y2.tint = Row2.mem           MatchBoxCheckHor         </lefttoright>         <righttoleft type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row2.mem = x0y2.tint           x0y2.tint = x1y2.tint           x1y2.tint = x2y2.tint           x2y2.tint = x3y2.tint           x3y2.tint = Row2.mem           MatchBoxCheckHor         </righttoleft>       </object>       <object name="Row3">         <inherit name="editor_object" />         <inventoryverbs type="stringlist" />         <displayverbs type="stringlist" />         <mem type="int">0</mem>         <visible type="boolean">false</visible>         <lefttoright type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row3.mem = x3y1.tint           x3y1.tint = x2y1.tint           x2y1.tint = x1y1.tint           x1y1.tint = x0y1.tint           x0y1.tint = Row3.mem           MatchBoxCheckHor         </lefttoright>         <righttoleft type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row3.mem = x0y1.tint           x0y1.tint = x1y1.tint           x1y1.tint = x2y1.tint           x2y1.tint = x3y1.tint           x3y1.tint = Row3.mem           MatchBoxCheckHor         </righttoleft>       </object>       <object name="Row4">         <inherit name="editor_object" />         <inventoryverbs type="stringlist" />         <displayverbs type="stringlist" />         <mem type="int">0</mem>         <visible type="boolean">false</visible>         <lefttoright type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row4.mem = x3y0.tint           x3y0.tint = x2y0.tint           x2y0.tint = x1y0.tint           x1y0.tint = x0y0.tint           x0y0.tint = Row4.mem           MatchBoxCheckHor         </lefttoright>         <righttoleft type="script">           MakeObjectInvisible (Row1)           MakeObjectInvisible (Row2)           MakeObjectInvisible (Row3)           MakeObjectInvisible (Row4)           Row4.mem = x0y0.tint           x0y0.tint = x1y0.tint           x1y0.tint = x2y0.tint           x2y0.tint = x3y0.tint           x3y0.tint = Row4.mem           MatchBoxCheckHor         </righttoleft>       </object>       <object name="Post1">         <inherit name="editor_object" />         <visible type="boolean">false</visible>         <displayverbs type="stringlist" />         <lower type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x0y0.tint           x0y0.tint = x0y1.tint           x0y1.tint = x0y2.tint           x0y2.tint = x0y3.tint           x0y3.tint = matchbox.mem           MatchBoxCheckHor         </lower>         <raise type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x0y3.tint           x0y3.tint = x0y2.tint           x0y2.tint = x0y1.tint           x0y1.tint = x0y0.tint           x0y0.tint = matchbox.mem           MatchBoxCheckHor         </raise>       </object>       <object name="Post2">         <inherit name="editor_object" />         <visible type="boolean">false</visible>         <displayverbs type="stringlist" />         <lower type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x1y0.tint           x1y0.tint = x1y1.tint           x1y1.tint = x1y2.tint           x1y2.tint = x1y3.tint           x1y3.tint = matchbox.mem           MatchBoxCheckHor         </lower>         <raise type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x1y3.tint           x1y3.tint = x1y2.tint           x1y2.tint = x1y1.tint           x1y1.tint = x1y0.tint           x1y0.tint = matchbox.mem           MatchBoxCheckHor         </raise>       </object>       <object name="Post3">         <inherit name="editor_object" />         <visible type="boolean">false</visible>         <displayverbs type="stringlist" />         <lower type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x2y0.tint           x2y0.tint = x2y1.tint           x2y1.tint = x2y2.tint           x2y2.tint = x2y3.tint           x2y3.tint = matchbox.mem           MatchBoxCheckHor         </lower>         <raise type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x2y3.tint           x2y3.tint = x2y2.tint           x2y2.tint = x2y1.tint           x2y1.tint = x2y0.tint           x2y0.tint = matchbox.mem           MatchBoxCheckHor         </raise>       </object>       <object name="Post4">         <inherit name="editor_object" />         <visible type="boolean">false</visible>         <displayverbs type="stringlist" />         <lower type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x3y0.tint           x3y0.tint = x3y1.tint           x3y1.tint = x3y2.tint           x3y2.tint = x3y3.tint           x3y3.tint = matchbox.mem           MatchBoxCheckHor         </lower>         <raise type="script">           MakeObjectInvisible (Post1)           MakeObjectInvisible (Post2)           MakeObjectInvisible (Post3)           MakeObjectInvisible (Post4)           matchbox.mem = x3y3.tint           x3y3.tint = x3y2.tint           x3y2.tint = x3y1.tint           x3y1.tint = x3y0.tint           x3y0.tint = matchbox.mem           MatchBoxCheckHor         </raise>       </object>     </object>     <object name="player">       <inherit name="editor_object" />       <inherit name="editor_player" />       <score type="int">0</score>       <alias>whitesails</alias>       <statusattributes type="stringdictionary">         <item>           <key>alias</key>           <value>!</value>         </item>         <item>           <key>score</key>           <value>Seeds !</value>         </item>         <item>           <key>match</key>           <value>Matches !</value>         </item>       </statusattributes>       <match type="int">0</match>       <set type="int">0</set>     </object>   </object>

Below is MatchBoxCheckHor

Click to expand!

```   ```

Below is MatchBoxCheckVer

Click to expand!

``` ```

Below is MatchBoxStep

Click to expand!

  <function name="MatchBoxStep">     if (x0y2.tint = x0y1.tint) {       if (x0y2.tint = x0y3.tint) {         x0y2.tint = 0       }       if (x0y1.tint = x0y0.tint) {         x0y1.tint = 0       }     }     if (x2y0.tint = x1y0.tint) {       if (x2y0.tint = x3y0.tint) {         x2y0.tint = 0       }       if (x1y0.tint = x0y0.tint) {         x1y0.tint = 0       }     }     if (x1y2.tint = x1y1.tint) {       if (x1y2.tint = x1y3.tint) {         x1y2.tint = 0       }       if (x1y1.tint = x1y0.tint) {         x1y1.tint = 0       }     }     if (x2y1.tint = x1y1.tint) {       if (x2y1.tint = x3y1.tint) {         x2y1.tint = 0       }       if (x1y1.tint = x0y1.tint) {         x1y1.tint = 0       }     }     if (x2y2.tint = x1y2.tint) {       if (x2y2.tint = x3y2.tint) {         x2y2.tint = 0       }       if (x1y2.tint = x0y2.tint) {         x1y2.tint = 0       }     }     if (x2y2.tint = x2y1.tint) {       if (x2y2.tint = x2y3.tint) {         x2y2.tint = 0       }       if (x2y1.tint = x2y0.tint) {         x2y1.tint = 0       }     }     if (x3y2.tint = x3y1.tint) {       if (x3y2.tint = x3y3.tint) {         x3y2.tint = 0       }       if (x3y1.tint = x3y0.tint) {         x3y1.tint = 0       }     }     if (x2y3.tint = x1y3.tint) {       if (x2y3.tint = x3y3.tint) {         x2y3.tint = 0       }       if (x1y3.tint = x0y3.tint) {         x1y3.tint = 0       }     }     MatchWatch   </function>

Below is MatchWatch

Click to expand!

``` ```

Below is MatchUpset

Click to expand!

``` ```


Below is MatchBoxCheckHor

```  <function name="MatchBoxCheckHor"><![CDATA[

    if (x3y0.tint = x2y0.tint) {
      if (x2y0.tint = x1y0.tint) {
        SetObjectFlagOn (x3y0, "ZERO")
        SetObjectFlagOn (x2y0, "ZERO")
        SetObjectFlagOn (x1y0, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x3y0.tint = 2) {
          player.match = player.match + 9
        }
        else {
          if (x0y0.tint <> x3y0.tint) {
            player.match = player.match - 6
          }
        }
      }
    }
    if (x3y1.tint = x2y1.tint) {
      if (x2y1.tint = x1y1.tint) {
        SetObjectFlagOn (x3y1, "ZERO")
        SetObjectFlagOn (x2y1, "ZERO")
        SetObjectFlagOn (x1y1, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x3y1.tint = 2) {
          player.match = player.match + 9
        }
        else {
          if (x0y1.tint <> x3y1.tint) {
            player.match = player.match - 6
          }
        }
      }
    }
    if (x3y2.tint = x2y2.tint) {
      if (x2y2.tint = x1y2.tint) {
        SetObjectFlagOn (x3y2, "ZERO")
        SetObjectFlagOn (x2y2, "ZERO")
        SetObjectFlagOn (x1y2, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x3y2.tint = 2) {
          player.match = player.match + 9
        }
        else {
          if (x0y2.tint <> x3y2.tint) {
            player.match = player.match - 6
          }
        }
      }
    }
    if (x3y3.tint = x2y3.tint) {
      if (x2y3.tint = x1y3.tint) {
        SetObjectFlagOn (x3y3, "ZERO")
        SetObjectFlagOn (x2y3, "ZERO")
        SetObjectFlagOn (x1y3, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x3y3.tint = 2) {
          player.match = player.match + 9
        }
        else {
          if (x0y3.tint <> x3y3.tint) {
            player.match = player.match - 6
          }
        }
      }
    }
    if (x0y0.tint = x2y0.tint) {
      if (x2y0.tint = x1y0.tint) {
        SetObjectFlagOn (x0y0, "ZERO")
        SetObjectFlagOn (x2y0, "ZERO")
        SetObjectFlagOn (x1y0, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x0y0.tint = 2) {
          player.match = player.match + 9
        }
        else {
          player.match = player.match - 6
        }
      }
    }
    if (x0y1.tint = x2y1.tint) {
      if (x2y1.tint = x1y1.tint) {
        SetObjectFlagOn (x0y1, "ZERO")
        SetObjectFlagOn (x2y1, "ZERO")
        SetObjectFlagOn (x1y1, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x0y1.tint = 2) {
          player.match = player.match + 9
        }
        else {
          player.match = player.match - 6
        }
      }
    }
    if (x0y2.tint = x2y2.tint) {
      if (x2y2.tint = x1y2.tint) {
        SetObjectFlagOn (x0y2, "ZERO")
        SetObjectFlagOn (x2y2, "ZERO")
        SetObjectFlagOn (x1y2, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x0y2.tint = 2) {
          player.match = player.match + 9
        }
        else {
          player.match = player.match - 6
        }
      }
    }
    if (x0y3.tint = x2y3.tint) {
      if (x2y3.tint = x1y3.tint) {
        SetObjectFlagOn (x0y3, "ZERO")
        SetObjectFlagOn (x2y3, "ZERO")
        SetObjectFlagOn (x1y3, "ZERO")
        SetObjectFlagOn (matchbox, "ZERO")
        if (x0y3.tint = 2) {
          player.match = player.match + 9
        }
        else {
          player.match = player.match - 6
        }
      }
    }
    MatchBoxCheckVer
  ]]> ```

Below is MatchBoxCheckVer

``` <function name="MatchBoxCheckVer"><![CDATA[
if (x0y3.tint = x0y2.tint) {
  if (x0y2.tint = x0y1.tint) {
    SetObjectFlagOn (x0y3, "ZERO")
    SetObjectFlagOn (x0y2, "ZERO")
    SetObjectFlagOn (x0y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x0y3.tint = 2) {
      player.match = player.match + 9
    }
    else {
      if (x0y0.tint <> x0y3.tint) {
        player.match = player.match - 6
      }
    }
  }
}
if (x1y3.tint = x1y2.tint) {
  if (x1y2.tint = x1y1.tint) {
    SetObjectFlagOn (x1y3, "ZERO")
    SetObjectFlagOn (x1y2, "ZERO")
    SetObjectFlagOn (x1y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x1y3.tint = 2) {
      player.match = player.match + 9
    }
    else {
      if (x1y0.tint <> x1y3.tint) {
        player.match = player.match - 6
      }
    }
  }
}
if (x2y3.tint = x2y2.tint) {
  if (x2y2.tint = x2y1.tint) {
    SetObjectFlagOn (x2y3, "ZERO")
    SetObjectFlagOn (x2y2, "ZERO")
    SetObjectFlagOn (x2y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x2y3.tint = 2) {
      player.match = player.match + 9
    }
    else {
      if (x2y0.tint <> x2y3.tint) {
        player.match = player.match - 6
      }
    }
  }
}
if (x3y3.tint = x3y2.tint) {
  if (x3y2.tint = x3y1.tint) {
    SetObjectFlagOn (x3y3, "ZERO")
    SetObjectFlagOn (x3y2, "ZERO")
    SetObjectFlagOn (x3y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x3y3.tint = 2) {
      player.match = player.match + 9
    }
    else {
      if (x3y0.tint <> x3y3.tint) {
        player.match = player.match - 6
      }
    }
  }
}
if (x0y0.tint = x0y2.tint) {
  if (x0y2.tint = x0y1.tint) {
    SetObjectFlagOn (x0y0, "ZERO")
    SetObjectFlagOn (x0y2, "ZERO")
    SetObjectFlagOn (x0y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x0y0.tint = 2) {
      player.match = player.match + 9
    }
    else {
      player.match = player.match - 6
    }
  }
}
if (x1y0.tint = x1y2.tint) {
  if (x1y2.tint = x1y1.tint) {
    SetObjectFlagOn (x1y0, "ZERO")
    SetObjectFlagOn (x1y2, "ZERO")
    SetObjectFlagOn (x1y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x1y0.tint = 2) {
      player.match = player.match + 9
    }
    else {
      player.match = player.match - 6
    }
  }
}
if (x2y0.tint = x2y2.tint) {
  if (x2y2.tint = x2y1.tint) {
    SetObjectFlagOn (x2y0, "ZERO")
    SetObjectFlagOn (x2y2, "ZERO")
    SetObjectFlagOn (x2y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x2y0.tint = 2) {
      player.match = player.match + 9
    }
    else {
      player.match = player.match - 6
    }
  }
}
if (x3y0.tint = x3y2.tint) {
  if (x3y2.tint = x3y1.tint) {
    SetObjectFlagOn (x3y0, "ZERO")
    SetObjectFlagOn (x3y2, "ZERO")
    SetObjectFlagOn (x3y1, "ZERO")
    SetObjectFlagOn (matchbox, "ZERO")
    if (x3y0.tint = 2) {
      player.match = player.match + 9
    }
    else {
      player.match = player.match - 6
    }
  }
}
if (GetBoolean(x0y0, "ZERO")) {
  x0y0.tint = 0
}
if (GetBoolean(x0y1, "ZERO")) {
  x0y1.tint = 0
}
if (GetBoolean(x0y2, "ZERO")) {
  x0y2.tint = 0
}
if (GetBoolean(x0y3, "ZERO")) {
  x0y3.tint = 0
}
if (GetBoolean(x1y0, "ZERO")) {
  x1y0.tint = 0
}
if (GetBoolean(x1y1, "ZERO")) {
  x1y1.tint = 0
}
if (GetBoolean(x1y2, "ZERO")) {
  x1y2.tint = 0
}
if (GetBoolean(x1y3, "ZERO")) {
  x1y3.tint = 0
}
if (GetBoolean(x2y0, "ZERO")) {
  x2y0.tint = 0
}
if (GetBoolean(x2y1, "ZERO")) {
  x2y1.tint = 0
}
if (GetBoolean(x2y2, "ZERO")) {
  x2y2.tint = 0
}
if (GetBoolean(x2y3, "ZERO")) {
  x2y3.tint = 0
}
if (GetBoolean(x3y0, "ZERO")) {
  x3y0.tint = 0
}
if (GetBoolean(x3y1, "ZERO")) {
  x3y1.tint = 0
}
if (GetBoolean(x3y2, "ZERO")) {
  x3y2.tint = 0
}
if (GetBoolean(x3y3, "ZERO")) {
  x3y3.tint = 0
}
MatchBoxSetUp

]]>```


    if (x0y0.tint <> 0) {
      if (x0y1.tint <> 0) {
        if (x0y2.tint <> 0) {
          if (x0y3.tint <> 0) {
            if (x1y0.tint <> 0) {
              if (x1y1.tint <> 0) {
                if (x1y2.tint <> 0) {
                  if (x1y3.tint <> 0) {
                    if (x2y0.tint <> 0) {
                      if (x2y1.tint <> 0) {
                        if (x2y2.tint <> 0) {
                          if (x2y3.tint <> 0) {
                            if (x3y0.tint <> 0) {
                              if (x3y1.tint <> 0) {
                                if (x3y2.tint <> 0) {
                                  if (x3y3.tint <> 0) {
                                    MatchBoxSetUp
                                    SetObjectFlagOff (matchbox, "STEP")
                                    SetObjectFlagOff (matchbox, "SHOW")
                                    SetObjectFlagOff (matchbox, "ZERO")
                                  }
                                  else {
                                    MatchUpset
                                  }
                                }
                                else {
                                  MatchUpset
                                }
                              }
                              else {
                                MatchUpset
                              }
                            }
                            else {
                              MatchUpset
                            }
                          }
                          else {
                            MatchUpset
                          }
                        }
                        else {
                          MatchUpset
                        }
                      }
                      else {
                        MatchUpset
                      }
                    }
                    else {
                      MatchUpset
                    }
                  }
                  else {
                    MatchUpset
                  }
                }
                else {
                  MatchUpset
                }
              }
              else {
                MatchUpset
              }
            }
            else {
              MatchUpset
            }
          }
          else {
            MatchUpset
          }
        }
        else {
          MatchUpset
        }
      }
      else {
        MatchUpset
      }
    }
    else {
      MatchUpset
    }
  ]]></function>```

```  <function name="MatchUpset">
if (x0y3.tint = 0) {
  x0y3.tint = GetRandomInt (1,3)
}
if (x0y2.tint = 0) {
  x0y2.tint = GetRandomInt (1,3)
}
if (x0y1.tint = 0) {
  x0y1.tint = GetRandomInt (1,3)
}
if (x0y0.tint = 0) {
  x0y0.tint = GetRandomInt (1,3)
}
if (x1y3.tint = 0) {
  x1y3.tint = GetRandomInt (1,3)
}
if (x1y2.tint = 0) {
  x1y2.tint = GetRandomInt (1,3)
}
if (x1y1.tint = 0) {
  x1y1.tint = GetRandomInt (1,3)
}
if (x1y0.tint = 0) {
  x1y0.tint = GetRandomInt (1,3)
}
if (x2y3.tint = 0) {
  x2y3.tint = GetRandomInt (1,3)
}
if (x2y2.tint = 0) {
  x2y2.tint = GetRandomInt (1,3)
}
if (x2y1.tint = 0) {
  x2y1.tint = GetRandomInt (1,3)
}
if (x2y0.tint = 0) {
  x2y0.tint = GetRandomInt (1,3)
}
if (x3y3.tint = 0) {
  x3y3.tint = GetRandomInt (1,3)
}
if (x3y2.tint = 0) {
  x3y2.tint = GetRandomInt (1,3)
}
if (x3y1.tint = 0) {
  x3y1.tint = GetRandomInt (1,3)
}
if (x3y0.tint = 0) {
  x3y0.tint = GetRandomInt (1,3)
}
SetObjectFlagOn (matchbox, "SHOW")
MatchBoxSetUp

```


That's what it looks like, and it didn't all go into the pink box. I don't know why not. However, it will copy and paste into the game engine accurately if anyone wants to see how it acts up, right now.


I'm looking through the code trying to spot irregularities; don't see anything yet. But this looks like the kind of code where it's easy for errors to creep in.

I think I'm kind of understanding what the last couple of functions do; haven't spotted any discrepancies there yet. But I wonder, would it be easier to debug with less repetition? The MatchUpset function, for example, could be shortened to:

for (x, 0, 3) {
  for (y, 0, 3) {
    box = GetObject ("x" + x + "y" + y)
    if (box.tint = 0) {
      box.tint = GetRandomInt (1,3)
    }
  }
}
SetObjectFlagOn (matchbox, "SHOW")
MatchBoxSetUp

If you use loops, then you at least know any problems are due to logic errors, rather than combing through code looking for a typo.


Thanks, mrangel, I'll update that part, right away. I have no idea what the problem is.


Log in to post a reply.

Support

Forums