Jump to content

Rouge Endif's and damage Control?


scarycave

Recommended Posts

I've begun working on a pre-existing mod to make the encounter more "Climatic", but a problem I'm having is that everytime I add a new endif statement the code goes wonky. I've dealt with it before, and I think it had something to do with a rouge Endif. The tool doesn't bring up any message about extra endifs, so it becomes a bit trouble some at times. Does anyone have any tips to help keep track of endifs?
Link to comment
Share on other sites

A pretty basic straight-forward approach to getting opening and closing of so-called code 'brackets' right is proper "indentation".

 

Begin
   If
       ; some code
   ElseIf
       ; some code
   ElseIf
       ; some code
   Else
       If
           ; some code
       ElseIf
           ; some code
       Else
           ; some code
       EndIf
   EndIf
   EndIf ; <- that one just sticks out like a red light
End

 

By properly indenting your code lines for example I for one will be able to quickly spot any bogus or missing EndIf in any code you post here.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...