Seeseehu Posted May 30, 2022 Share Posted May 30, 2022 Help i get this error whenever i try using cmdline for my program #include "../IncludeAll.au3" Dim $CmdLine[1] Local $SupportedOses[3] = ["WIN_2012R2","WIN_2012","WIN_2008R2"] If @OSVersion == $SupportedOses[1] Then If $CmdLine[0] > 0 Then If $CmdLine[1] == "" Then ConsoleWriteError("Startservice failed. Try using -test to see if rssc works") Sleep("5000") _exit() ElseIf $CmdLine[1] == "-test" Then ConsoleWriteError("Test complete") Loadgraphics("296", "306", "Renderer", "") Sleep("5000") _exit() EndIf Else ConsoleWriteError("Startservice failed. Try using -test to see if rssc works") Sleep("500") EndIf Else ConsoleWriteError("Bricks online server only works with " & $SupportedOses[1]) Sleep("500") Exit EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted May 30, 2022 Developers Share Posted May 30, 2022 (edited) Why do you have this line? Dim $CmdLine[1] This is an internal provided array..... And......arrays are 0 based! Jos Edited May 30, 2022 by 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...
Seeseehu Posted May 30, 2022 Author Share Posted May 30, 2022 I added that line as an attempt to fix that error. t Link to comment Share on other sites More sharing options...
Subz Posted May 30, 2022 Share Posted May 30, 2022 My guess, the issue is within the IncludeAll.au3 Link to comment Share on other sites More sharing options...
Seeseehu Posted May 31, 2022 Author Share Posted May 31, 2022 i dont think it is in include all ;Main includes #include <File.au3> #include <WinAPIFiles.au3> #include <InetConstants.au3> #include <MsgBoxConstants.au3> #include <File.au3> #include <FileConstants.au3> #include <Date.au3> #include <au3Irr2_Constants.au3> #include <au3Irr2_System.au3> #include <au3Irr2_KeyboardMouse.au3> #include <au3Irr2_FilingSystem.au3> #include <au3Irr2_2D.au3> #include <au3Irr2_Materials.au3> #include <au3Irr2_Scene.au3> #include <au3Irr2_Node.au3> #include <au3Irr2_Animation.au3> #include <au3Irr2_Collision.au3> #include <au3Irr2_Camera.au3> #include <au3Irr2_Lighting.au3> #include <au3Irr2_Terrain.au3> #include <au3Irr2_Particles.au3> #include <au3Irr2_GUI.au3> #include <Zip.au3> Link to comment Share on other sites More sharing options...
Subz Posted May 31, 2022 Share Posted May 31, 2022 If you use error handling for example _ArrayDisplay(), MsgBox() you should be able to determine where the error is coming from, but the code above should work minus the "Dim.." line Personally for CmdLine switches, I use a customised version of the following UDF CmdLine UDF (get value/existence/flag) - AutoIt Example Scripts - AutoIt Forums (autoitscript.com) Link to comment Share on other sites More sharing options...
Developers Jos Posted May 31, 2022 Developers Share Posted May 31, 2022 8 hours ago, Seeseehu said: I added that line as an attempt to fix that error. t Fine, so post an correct and runnable script without all the extra's , and provide the commandline parameters to start it with to cause the error. 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...
rudi Posted May 31, 2022 Share Posted May 31, 2022 I'd like to suggest to run your script from SciTE Editor and then take a look at the output: It will show you the line causing the "dimension range exceeded" error and the array variable, that was addressed. This sample code might help you to see, what's going wrong: Dim $ArrayGivingTrouble[3][4][5] $Dimensions=UBound($ArrayGivingTrouble,0) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Dimensions = ' & $Dimensions & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console for $d = 1 to $Dimensions ConsoleWrite("Ubound for Dimension " & $d & " = " & UBound($ArrayGivingTrouble,$d) & @CRLF) Next Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Seeseehu Posted June 2, 2022 Author Share Posted June 2, 2022 @Jos RSSC.au3 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 2, 2022 Developers Share Posted June 2, 2022 (edited) No need for an attachment, just use a codebox, but this file looks exactly the same as the earlier posted code and that obviously doesn't work for me as I do not have you include file(s). One needs to be able to run the script to be able to debug. You could start yourself with running it form SciTE so it tells you exactly which line is causing it. Edited June 2, 2022 by 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...
Seeseehu Posted June 3, 2022 Author Share Posted June 3, 2022 18 hours ago, Jos said: No need for an attachment, just use a codebox, but this file looks exactly the same as the earlier posted code and that obviously doesn't work for me as I do not have you include file(s). One needs to be able to run the script to be able to debug. You could start yourself with running it form SciTE so it tells you exactly which line is causing it. Yo i removed zip.au3 from includeall and it fixed the issue, idk why a zip udf would get in the way of cmdline tbh tho Link to comment Share on other sites More sharing options...
rudi Posted June 3, 2022 Share Posted June 3, 2022 @Seeseehu Nice, that you were able to fix your issue. Not that nice, that you ignored all answer postings and didn't provide any of the information, you have been asked for. Never mind ... Earth is flat, pigs can fly, and Nuclear Power is SAFE! 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