Jump to content
Sign in to follow this  
AuToItItAlIaNlOv3R

[Possible Bug] Error when i compile a file

Recommended Posts

AuToItItAlIaNlOv3R

Hello guys, i've a strange problem. I write a programm, scite don't find any error, i run it from scite editor, and it work. But if i compile it whit "Compile script to .exe" programm, he give me this error :

Line -1:
Error: Incorrect number of parameters in function call.

I use Autoit v3.3.1.1 (beta), and i compile it whit "Compile script to .exe (Beta)". The exe give me an error while i download a file using new Inetgetinfo function. How i fix it?...this is an unusual error 8|

Share this post


Link to post
Share on other sites
lordicast

Show some code please, that error is not enough information.

EDIT: Although it looks like you have a function that is being used without the right amount of parameters.

IE

Msgbox(0,'Hello');<---- Like Error
Msgbox(0,'Hi','Hello');<--- Right
Edited by lordicast

[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites
Jos

Hello guys, i've a strange problem. I write a programm, scite don't find any error, i run it from scite editor, and it work. But if i compile it whit "Compile script to .exe" programm, he give me this error :

Line -1:
Error: Incorrect number of parameters in function call.

I use Autoit v3.3.1.1 (beta), and i compile it whit "Compile script to .exe (Beta)". The exe give me an error while i download a file using new Inetgetinfo function. How i fix it?...this is an unusual error 8|

I am pretty sure you will get an error when you have installed the Full version of SciTE4AutoIt3 and used the standard AutoIt3 installers.

If not then show the SciTE output pane information when you run teh script containing the error.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

The script don't contain error. Scite don't see any message! if i run it with "Run Script Beta" the script work, but if i compile it with "Compile script to .exe (Beta)" give me an error!

Share this post


Link to post
Share on other sites
Jos

The script don't contain error. Scite don't see any message! if i run it with "Run Script Beta" the script work, but if i compile it with "Compile script to .exe (Beta)" give me an error!

Again: Show the output in the SciTE output pane when running (F5) and Compiling (F7) the script. Only them I can see if/what is wrong.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

Again: Show the output in the SciTE output pane when running (F5) and Compiling (F7) the script. Only them I can see if/what is wrong.

Jos

Incorrect number of parameters in function call.:
$filesize1 = InetGetSize ($Sorgentemu1,1)
$filesize1 = ^ ERROR

This is an error but the the function is well, scite don't compile "ALL" the new function of autoit beta.

This is when i compile the file:

Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2008
UPX 3.03w       Markus Oberhumer, Laszlo Molnar & John Reiser   Apr 27th 2008

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    687104 ->    364544   53.06%    win32/pe     Myprogramm.exe

Packed 1 file.
>Exit code: 0    Time: 4.853

P.S. Why scite don't higtlight the new autoit beta function? and don't compile the new function?...I am forced to start "Run Script Beta" to run the script with new function >_<

Edited by AuToItItAlIaNlOv3R

Share this post


Link to post
Share on other sites
Jos

Incorrect number of parameters in function call.:
$filesize1 = InetGetSize ($Sorgentemu1,1)
$filesize1 = ^ ERROR

This is an error but the the function is well, scite don't compile "ALL" the new function of autoit beta.

This is when i compile the file:

Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2008
UPX 3.03w       Markus Oberhumer, Laszlo Molnar & John Reiser   Apr 27th 2008

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    687104 ->    364544   53.06%    win32/pe     Myprogramm.exe

Packed 1 file.
>Exit code: 0    Time: 4.853

P.S. Why scite don't higtlight the new autoit beta function? and don't compile the new function?...I am forced to start "Run Script Beta" to run the script with new function >_<

This is not all output in the SciTE Output pane, but I am pretty sure you have NOT installed the full SciTE4Autoit3 installer that is a separate download!

SciTE will only Highlight those functions that are present in the last loaded configfiles that come with the AutoIt3 Installer.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

I've installed this packet in my pc :

http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe

Now i install this :

http://www.autoitscript.com/autoit3/scite/downloads.shtml

Why if i compile it whit "Compile script to .exe" programm, he give an error?

Edited by AuToItItAlIaNlOv3R

Share this post


Link to post
Share on other sites
Jos

Why if i compile it whit "Compile script to .exe" programm, he give an error?

In the current production version the InetGetSize() on takes 1 parameter, in Beta 2.

So you must be compiling with the current Production version.

Use the Full SciTE and Run & Compile from there.

F5 = Run PRod

Alt+F5 = Run Beta

F7 = Compile Prod

Alt+F7 = Compile Beta


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

This is the F5 output whit complete scite:

ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize1 = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filefilesize = InetGetSize ($source,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetInfo(): undefined function.
               $adata1 = InetGetInfo($hdownload1)

This is the F7 output :

ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize1 = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetInfo(): undefined function.
               $adata1 = InetGetInfo($hdownload1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Share this post


Link to post
Share on other sites
lordicast

If the problem is with InetGetSize then it may be a issue of a Internet Security option or program. It may work with Scite because it isn’t blocking Scite but it may block other .exe trying to access the internet through port 80 or another. Do you have any Virus Protection or Special Firewall protection setup?


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites
Jos

This is the F5 output whit complete scite:

ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize1 = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filefilesize = InetGetSize ($source,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetInfo(): undefined function.
               $adata1 = InetGetInfo($hdownload1)

This is the F7 output :

ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize1 = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetSize() [built-in] called with wrong number of args.
            $filesize = InetGetSize ($Source1,1)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ERROR: InetGetInfo(): undefined function.
               $adata1 = InetGetInfo($hdownload1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

I am sorry, but you will have to show me all of the SciTE output pane information before I know what is happening.

Let me ask you this as well: Have you installed Both AutoIt3 Production and Beta using the regular installers and nothing else?

Edit: By the way: the Errors look correct as I already have explained!

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

If the problem is with InetGetSize then it may be a issue of a Internet Security option or program. It may work with Scite because it isn’t blocking Scite but it may block other .exe trying to access the internet through port 80 or another. Do you have any Virus Protection or Special Firewall protection setup?

Huh ? I think the error he gets is correct as I already explained.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
lordicast

Huh ? I think the error he gets is correct as I already explained.

Ok. Its just on my Home comp I have to allow each program that uses a port to access the internet ie;Scite- When using IE.au3 and others. I thought he did the same. >_<


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

I've do a Systax Check Prod (beta) and scite don't find any error :

+>22:26:30 Starting AutoIt3Wrapper v.2.0.0.1 
+>22:26:30 AU3Check ended.rc:0
+>22:26:30 AutoIt3Wrapper Finished
>Exit code: 0    Time: 0.855

If i run it with "Beta Run (Alt+F5)" the script work done, but if i compile it whit "Beta Compile Alt+F7", i've this error :

Line -1:
Error: Incorrect number of parameters in function call.

I'm very very confused 8|

P.S. All security programm are disabled.

This is the script :

#include <Inet.au3>
$source = _INetGetSource ("http://www.xxxxx.com")
$capture = StringTrimLeft($source, StringInStr($source,'/',0,-1))
$hdownload = InetGet($source, @DesktopDir & "\" & $capture, 1, 1)
Do
   Sleep(250)
   TrayTip("Try",StringFormat('%.1f', Round(InetGetInfo($hdownload, 0) / InetGetInfo($hdownload, 1) * 100, 1)) & '%',30)
Until InetGetInfo($hdownload, 2)
Local $adata = InetGetInfo($hdownload)
InetClose($hdownload)
ToolTip('')
MsgBox(262144, "Try", "File downloaded" )

If i compile it to exe it don't work! if i run it into scite work done.

Edited by AuToItItAlIaNlOv3R

Share this post


Link to post
Share on other sites
Jos

If i run it with "Beta Run (Alt+F5)" the script work done, but if i compile it whit "Beta Compile Alt+F7", i've this error :

Line -1:
Error: Incorrect number of parameters in function call.

I'm very very confused 8|

P.S. All security programm are disabled.

I give up. No SciTE output no help.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
trancexx

I give up. No SciTE output no help.

Jos

It looks like Aut2exe beta bug.

a3x is wrong. InetGetInfo() related.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

Scite don't give me output the script is done! if i run it with "Beta Run (Alt+F5)" the script work done, but if i compile it whit "Beta Compile Alt+F7" it give me an error.

v>Running AU3Check (1.54.16.0)  from:C:\Program\AutoIt3\Beta
+>14:24:48 AU3Check ended.rc:0
+>14:24:48 AutoIt3Wrapper Finished
>Exit code: 0    Time: 1.1

Probably there is a bug in Aut2exe!

Share this post


Link to post
Share on other sites
ProgAndy

Theres already a fixed ticket for Inet-functions in compiled Beta-scripts (http://www.autoitscript.com/trac/autoit/ticket/1036)

You have to wait for Beta 3.3.1.2 >_<


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

then it is a bug? was not an error in my sourcecode?

when exit Autoit Beta 3.3.1.2 beta ??

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.