Jump to content

Recommended Posts

Posted

I've searched these forums and read the help article: http://www.autoitscript.com/autoit3/docs/intro/running.htm#CommandLine and I can't find a clear answer to this.

Why do I receive the error "Line -1: Error: Incorrect number of parameters in function call" when I pass two parameters to a script in the the command line: "compiledscript.exe Test1 Test33"?

Code:

$sParam1 = $CmdLine[1]

$sParam2 = $CmdLine[2]

MsgBox($sParam1 & " " & $sParam2)

Do I have to call $CmdLine from a function? Can I not pass parameters to variables within my script? I am clearly passing two arguments to a script that is expecting two arguments.

  • Developers
Posted

your msgbox() is missing parameters.

Its easier to debug these type of issues when you use the Full SciTE4AutoIt3 package which would run au3check and report these type of problems.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...