Search the Community
Showing results for tags 'wrong number of arguments'.
-
I am trying to call a function with 7 arguments and when i do so, it says i called with only 6. When I add another argument, it says called with 8 arguments max is 7. PS this code runs just fine when I use it out of my MainProgram.au3 in a separate Temp.au3. But when i use it with the rest of my Functions it keeps returning the errors. ;TEMP.AU3 Global $LoginTextField[2] $LoginTextField[0]=1 $LoginTextField[1]=23 CustomClick("videoz","","","left",2,$LoginTextField[0],$LoginTextField[1]) ;clicking Login field Func CustomClick($sTitle,$sText,$sControlId,$sButton,$iClicks,$iX,$iY) ConsoleWrite("C. Clicking " &"("& $iX &","& $iY &")") Local $OffSetX=0 Local $OffSetY=0 ControlClick($sTitle,$sText,$sControlId,$sButton,$iClicks,$iX+$OffSetX,$iY+$OffSetY) MouseMove($iX+$OffSetX,$iY+$OffSetY) EndFunc Note: I pasted the exact same code in my MainProgram.au3 with minor changes like initialising the variable by a function (yes there is no problems with initilisation, I rechecked) and Declaring variables in separate functions and calling them in separate functions. There are no conflicts, variables of same name or similar stuff. Note2: The EXACT same code compiles fine on my PC2, (both have the recommeded autoit installed, updated, both are windows 10, amd and 64 bits) Is this a bug in autoit? Because previously, I had a similar problem with another function, which used to return errors saying wrong number of arguments while compiling on my PC1 but on PC2 the same EXACT code compiled without any issues. Then the program, compiled fine on PC1 too the next morning after a Reboot and stuff Has this happened with anyone before?