Scripter88 Posted December 2, 2009 Share Posted December 2, 2009 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 2, 2009 Developers Share Posted December 2, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now