Jump to content
Sign in to follow this  
sbsmac

Squint - the sqf editor and error-checker

Recommended Posts

want to point out that the command getTerrainHeightASL is not in the command dictionary in Squint, and I cant figure out how to add it in. I have to comment out the line in order to see if any real errors exist.

just a friendly reminder ^^

Share this post


Link to post
Share on other sites

yep Mac please either update the SQF command list or let the users update the list themselves :bounce3:

Share this post


Link to post
Share on other sites

<cough> Been away from this for a bit but thanks for all the input. No promises but I'll look into doing the fixes. Is anyone out there interested in helping out with this project ? Anything from documentation to coding (particularly UI and error-rules) ...

Share this post


Link to post
Share on other sites

How do the error-rules look like/how are they made?

Share this post


Link to post
Share on other sites

Error rules are written in C# and require a knowledge of the squint DOM which I've yet to document ;) The closest model to what they will look like is the existing mac.arma configvisitor class at http://www.armaleague.com/mac/Mac_arma/html/class_mac_1_1_arma_1_1_config_1_1_config_visitor.html

Here's a slightly fictional example of what rules might end up looking like...

 

   /* Check for incorrect checks such as "_a == objnull"
       which should be rewritten as "isNull _a"
   */
   public class CheckObjNullComparison : SqfRule
   {
       public override void VisitOperatorExpression(Expression parent, OperatorExpression current)
       {
          if (current.OneOf(new {"objnull","controlnull","displaynull","grpnull","locationnull"})
           {
               var assign = parent as OperatorExpression;
               if (assign !=null && assign.OneOf(new {"==","!="}))
               {
                   ParseError err = Parser.Warn("Comparison with '" + op.CasedName + "' will always fail - use isNull instead", assign);

                   if (assign.LHS != null)
                   {
                       var neg = "";
                       if (assign.Op == "!=") neg = "!";
                       err.AddAction(ErrorActionType.Replace, neg + "isNull " +       assign.LHS.Text);
                   }
               }
           }
           base.VisitOperatorExpression(parent,current);
       }
   }

Edited by sbsmac
minor tidy up

Share this post


Link to post
Share on other sites

Thanks Mac

Right now I can offer testing, feedback, smaller code adjustments/extensions and help

with documentation.

One possible new check:

#include "gdtmod_hdr.hpp";

=>

#include "gdtmod_hdr.hpp"

Share this post


Link to post
Share on other sites

Thanks kju. It'll take a little while until I can get the project in a state where other people can usefully contribute but just to show you that changes are coming, here is a new prototype UI based on the excellent AvalonDock and AvalonEdit components....

None of the backend error checking is wired up yet nor are any real editor functions implemented but this gives an idea of the direction I'm going in

Edited by sbsmac
removed broken links

Share this post


Link to post
Share on other sites

IMPORTANT - squint is currently offline

This is due to armaleague.com being suspended. I'm trying to find out whether this is a permanent state of affairs, if so I'll sort out an alternative home in the next few days. Apologies for the inconvenience.

Share this post


Link to post
Share on other sites

damn :(

have the same prob with my domain..

Share this post


Link to post
Share on other sites

Any news on getting this back online?

Must have downloaded all the different editors I could find on Armaholic's but none of them come close to the functionality and ease of use provided by SQUINT.

Share this post


Link to post
Share on other sites

Is it possible to disable the check when starting squint.

Right now it cannot be used at all right?

Share this post


Link to post
Share on other sites

No. If you want to install it from scratch, the Setup.exe tries to connect to the suspended Webpage. :(

Share this post


Link to post
Share on other sites

Temporary new version available from http://homepage.ntlworld.com/n.macmullen/projects/squint/bin/setup.exe

You may need to remove the old version first using add/remove programs. Apologies for the inconvenience - I'm working on a new version with updated UI and more features but it may be a while yet...

Edited by sbsmac

Share this post


Link to post
Share on other sites

Works. Thanks a lot :)

Edit: Mac you want to rethink your design here.

It is an quite effective kill switch. :)

You want to give the user the ability to cancel the online check

and start the app regardless.

Cheers.

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites

Hey Mac,

Sorry to ask more work from you, but your RPT Mon also suffers from the same problem. Can you tweak that too pretty please with a cherry on top? :p

Thanks!

Share this post


Link to post
Share on other sites

Hate to beg for an update....

But is there any update? :) I am so missing Squint!

**edit**

And now it's working! Suspect PEBKAC.

Edited by Tankbuster

Share this post


Link to post
Share on other sites

Great tool!

I read about it, but finally I managed to get some time and have it installed.

Keep up the good work.

**edit**

Colour schemes are not to be found.

Would be nice to have them!

Edited by Gameadd1cted

Share this post


Link to post
Share on other sites

Not sure if someone else has mentioned this or not, but "visiblePosition" needs to be added to the list of approved commands. I would add it to the dictionary myself, but I am not sure which dropdown to declare the command as.

By the way, I love this tool. It's done more to improve my coding than any tutorial. Thanks for helping the community so much with this truly great tool.

Share this post


Link to post
Share on other sites
By the way, I love this tool. It's done more to improve my coding than any tutorial. Thanks for helping the community so much with this truly great tool.

+1

As a complete newbie to scripting, Squint is essential. A brilliant tool, very professional implementation, and AFAICT absolutely bug-free.

Anyone scripting anything in SQF should use Squint...especially numpties like me :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×