Modify

Opened 4 years ago

Closed 3 years ago

Last modified 2 months ago

#2372 closed Bug (Fixed)

Function incorrect number of parameters error on wrong line

Reported by: Mat Owned by: Jon
Milestone: 3.3.13.11 Component: AutoIt
Version: 3.3.9.13 Severity: None
Keywords: Cc:

Description

It is reporting the location of where another function was defined, rather than the line that the error occurred.

For example, the error below is that I am calling HotkeySet with 3 arguments, when it should only have 2.

Func UDF_Function($a, $b)
EndFunc

HotkeySet(UDF_Function(1, 2), "", "")

The output is:

v3.3.9.13:

"test.au3" (1) : ==> Incorrect number of parameters in function call.:
Func UDF_Function($a, $b)
^ ERROR
->10:29:37 AutoIt3.exe ended.rc:1

v3.3.8.1:

test.au3 (1) : ==> Incorrect number of parameters in function call.:
HotkeySet(UDF_Function(1, 2), "", "")
^ ERROR
->10:35:19 AutoIt3.exe ended.rc:1

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by mlipok

is it fixed ?

3.3.8.1

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "L:\test3.au3" /UserParams    
+>23:26:37 Starting AutoIt3Wrapper v.2.1.2.29 SciTE v.3.3.6.0 ;  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.9.5)  from:C:\Program Files (x86)\AutoIt3
"L:\test3.au3"(4,37) : error: HotKeySet() [built-in] called with wrong number of args.
HotkeySet(UDF_Function(1, 2), "", "")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
L:\test3.au3 - 1 error(s), 0 warning(s)
!>23:26:38 AU3Check ended. Press F4 to jump to next error.rc:2
>Exit code: 2    Time: 0.309

3.3.9.22

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "L:\test3.au3" /UserParams    
+>23:26:57 Starting AutoIt3Wrapper v.2.1.2.29 SciTE v.3.3.6.0 ;  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.9.22)  from:C:\Program Files (x86)\AutoIt3\Beta
"L:\test3.au3"(4,37) : error: HotKeySet() [built-in] called with wrong number of args.
HotkeySet(UDF_Function(1, 2), "", "")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
L:\test3.au3 - 1 error(s), 0 warning(s)
!>23:26:57 AU3Check ended. Press F4 to jump to next error.rc:2
>Exit code: 2    Time: 0.325

Remarks:
I have SciTe and all others in latest Beta version

comment:2 Changed 4 years ago by Mat

Mlipok, that is the output from Au3Check. This bug is concerning the output of the AutoIt interpreter itself.

comment:3 Changed 3 years ago by Jon

  • Milestone set to 3.3.13.11
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10474] in version: 3.3.13.11

comment:4 follow-up: Changed 8 months ago by mishraparthasarathi9@…

Still getting the same issue. Issue is not fixed getting error in correct number of parameters in function call

comment:5 in reply to: ↑ 4 Changed 2 months ago by anonymous

Replying to mishraparthasarathi9@…:

Still getting the same issue. Issue is not fixed getting error in correct number of parameters in function call

Me too. Please tell me what is a crap on this easy thing ....
Compile : "error: Debug_file_msg() called by a previous line with 2 arg(s). Max = 1. First previous line calling this Func is 89"

call at line 89 : D_msg("Hello world")

function definition (end of code) :
Func D_msg($dt = "")

If $debug_file = 1 Then

FileWriteLine($debugFilename, $dt)

EndIf

EndFunc

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.