Jump to content

Recommended Posts

Posted

Uhhm just a question, is it possible a script can get too long for AU3Check?

Or what other reasons can break AU3Check?

AU3Check works for all scripts I have exept for just one.

In that one I can just write random non existing functions or write variables without declaration (& MustDeclarVars on) but AU3Check returns no error (but the script crashes when running ofcourse)

Data:

  • AU3Check version: 1.54.22.0.
  • Script length: 701 lines / 25589 characters (but I don't think thats the reason right?)
MsgBox(0x40040, "", "Hello Forum!")
  • Moderators
Posted

1RV34,

I run AU3Check on much longer scripts without problem, so length is not a factor here. Would you care to post the script so we can play with it ourselves? :oops:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

Yeah I thought it wasn't because of that.. and I don't want to post the script :S

Where can I find a buglist of the AU3Check or something I can check?

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
Posted

Check the History Log for AU3Check.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

What should I look for in the history log? :S (I have the latest version so I don't know what looking to fixes I already have helps, but maybe I'm wrong)

Edit: It seem's one of my includes is breaking it, one moment I'll post a link to the include.

Edit 2: JSON.au3

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
Posted

If you search the History for "AU3Check" you will see what has been changed. Or you could search the Bugtracker for "AU3Check" for open/closed tickets.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

The include used @LF instead of @CRLF line breaks..

the script ran fine because it recognized @LF, but AU3Check and SciTE apperently not because it marked everything after #comments-start (and #comments-end) as a comment o.o

Edit: converted the line end characters, but the problem still happens, but only after including that JSON.au3 o.o

Edit: well found the problem...

F:PortableApps***OtherSourceIncludeJSONJSON.au3(479,70) : WARNING: $k: possibly used before declaration.
$_JSONErrorMessage='duplicate key specified for object: "' & $k &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
F:PortableApps***OtherSourceIncludeJSONJSON.au3(897,73) : ERROR: __JSONEncodeInternal() previously called with expression on Const ByRef param(s).
func __JSONEncodeInternal(const byRef $holder,const byRef $k,$v,$indent)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
F:PortableApps***OtherSourceIncludeJSONJSON.au3(344,67) : REF: first call to __JSONEncodeInternal().
local $s=__JSONEncodeInternal($_JSONNull,$_JSONNull,$v,$linebreak)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
F:PortableApps***OtherSourceIncludeJSONJSON.au3(479,70) : ERROR: $k: undeclared global variable.
$_JSONErrorMessage='duplicate key specified for object: "' & $k &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
F:PortableApps***OtherSourceIncludeJSONJSON.au3 - 2 error(s), 1 warning(s)

& last time the author was online was 2009.. XD

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
Posted (edited)

Au3Check isn't broken, read the comments. As you can see variables haven't been declared and in one section you're not passing a variable because this is using the ByRef command. So my advice is to pay attention to the output and fix accordingly. Otherwise post your code and I will do it for you.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 3/2/2012 at 10:35 AM, 'guinness said:

Au3Check isn't broken, read the comments. As you can see variables haven't been declared and in one section you're not passing a variable because this is using the ByRef command. So my advice is to pay attention to the output and fix accordingly. Otherwise post your code and I will do it for you.

My AU3Check didn't output anything for my script because that include is broken.

  On 3/2/2012 at 9:47 AM, '1RV34 said:

Edit: It seem's one of my includes is breaking it, one moment I'll post a link to the include.

Edit 2: JSON.au3

But if you could fix that UDF you would make me very happy XD (and if you post it in that topic probably more people)

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
Posted (edited)

Ok. But what is that output you posted above? How did you get that? Im not in a position to look at it now. Also are you using advanced parameters with au3? In the meantime please look at the output above and read what it says, the errors are transparent.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Took me 30 seconds to fix!

Source:

1RV34,

I haven't tested whether the UDF achieves what it's supposed to do as I have no use for this UDF. Please in the future don't jump to conclusions that it's an immediate problem with Au3Check or any AutoIt product for that matter, as 9/10 it isn't as demonstrated here.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

Ok sorry I was wrong about it being AU3Check's fault..

but your modifications didn't fix all problems :/

Just used this to test and it doesn't report any errors (even tho $gfhdagjhfkldsjkn never was declared and gfhdagjhfkldsjkn() never was defined)

Opt("MustDeclareVars", 1)
;~ #include "JSON.au3"
#include "JSON_Translate.au3"; JSON_Translate.au3 includes JSON.au3 too
gfhdagjhfkldsjkn("test")
$gfhdagjhfkldsjkn = "test"

Edit: and sorry for not doing it myself, but I really have no idea why this is happening :S

Edited by 1RV34
MsgBox(0x40040, "", "Hello Forum!")
Posted

Really? Because it gave me this error (I'm using the latest beta released a couple of days ago.)

  Quote

$gfhdagjhfkldsjkn = "test""C:Example.au3"(5,27) : warning: $gfhdagjhfkldsjkn possibly not declared/created yet

$gfhdagjhfkldsjkn = "test"

~~~~~~~~~~~~~~~~~~~~~~~~~~^

"C:Example.au3"(4,24) : error: gfhdagjhfkldsjkn(): undefined function.

gfhdagjhfkldsjkn("test")

~~~~~~~~~~~~~~~~~~~~~~~^

C:Example.au3 - 1 error(s), 1 warning(s)

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

I'm sure even in the version you're using this would show an error.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

*major facepalm* I kept the 2 versions next to eachother... then typed the include path to the old one in... *hides in some corner*

MsgBox(0x40040, "", "Hello Forum!")
Posted

OK, so everything is working now?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

I just tested his script with the latest version (3.3.8.0) and the beta (3.3.9.1) and I got no errors when I ran AU3Check on it. I opened JSON_Translate.au3 (Saved as UTF-8 with BOM) in Scite and then saved it as ANSI text, no BOM, and then I get the error that the function doesn't exist. It might be related to trac ticket #2091 which was supposed to have fixed this.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

  On 3/2/2012 at 3:25 PM, 'guinness said:

OK, so everything is working now?

Testing and... YES! Thank you :oops:

MsgBox(0x40040, "", "Hello Forum!")
Posted

Great!

BrewManNH,

I got the errors even with the encoding, but then again I am using the latest beta.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...