Xibalba Posted September 8, 2010 Share Posted September 8, 2010 (edited) Hello,I have an array declared as followed:Global Const $myArray[73][3] = _ [ _ ["0", "4", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["1", "3", "0011000000000011000000000011111111110001111111111000"], _ ["2", "2", "0000000011111111110001111111111000"], _ (~60 more rows) ]This has worked fine until my last inserted element. Script doesn't start, saying:"Error: String missing closing quote."And points at the array declaration.First I thought it was some random syntax error on my part, but then I tested the following:By removing ANY 5 lines (rows) ANYWHERE in the array, and the script runs just fine.And so it must be some other error, most likely some sort of range- or capacity-limit reached.What is wrong? What limits can possible have been reached? How can I continue debugging?The [73] position declaration is just temporary and cannot have anything to do with it since it's NOT reached (tested increasing).The array is properly closed with "_" instead of ", _" after the last bracket.As I said, removing any 5 lines worksThe 3 positions all contain strings. The longest string is of length 143.Thanks in advance, really need to sort this out asap! :\ Edited September 8, 2010 by Xibalba Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 8, 2010 Moderators Share Posted September 8, 2010 Xibalba, You have hit the 4095 character line limit. You will need to split your declaration into smaller chunks, which with a 2D array is not that simple. Have you thought of storing the elements in a file and then reading them in from there into the array? You would need a bit more coding, but nothing more complicated than a couple of nested loops. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 8, 2010 Share Posted September 8, 2010 (edited) You have hit the 4095 character line limit. That limit was removed a few versions ago (3.3.3.2 Beta). The syntax checker simply doesn't like the funky syntax you are using. Stop using it. This will work every time, regardless of size: Global Const $myArray[73][3] = [["0", "4", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["1", "3", "0011000000000011000000000011111111110001111111111000"], _ ["2", "2", "0000000011111111110001111111111000"], _ ["71", "1", "0011000000000011000000000011111111110001111111111000"], _ ["72", "0", "0000000011111111110001111111111000"]] Edited September 8, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Xibalba Posted September 8, 2010 Author Share Posted September 8, 2010 That limit was removed a few versions ago (3.3.3.2 Beta). The syntax checker simply doesn't like the funky syntax you are using. Stop using it. This will work every time, regardless of size: Global Const $myArray[73][3] = [["0", "4", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["1", "3", "0011000000000011000000000011111111110001111111111000"], _ ["2", "2", "0000000011111111110001111111111000"], _ ["71", "1", "0011000000000011000000000011111111110001111111111000"], _ ["72", "0", "0000000011111111110001111111111000"]] Same error. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 8, 2010 Share Posted September 8, 2010 (edited) Post the exact, full demo (in code tags, of course) with no pseudo code or "(~60 more rows)" in it. And what version are you running? I tried mine with 300 appended lines of over 200 characters each: #include <Array.au3> Global Const $myArray[1000][3] = [["011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ; ... copy above line over 300 times ["011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000"], _ ["011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000", "011111111000011111111110001000000001000100000000100011111111110000111111110000"]] _ArrayDisplay($myArray, "$myArray") Edit: Oops, posting the large demo triggered code protection on the board. Edited September 8, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Xibalba Posted September 8, 2010 Author Share Posted September 8, 2010 (edited) v. 3 Or how do I find out exact version? (3.x.x?) EDIT: From the helpfile I'm using (AutoIt3.chm): v3.3.2.0 Edited September 8, 2010 by Xibalba Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 8, 2010 Share Posted September 8, 2010 (edited) v. 3Or how do I find out exact version? (3.x.x?)EDIT: From the helpfile I'm using (AutoIt3.chm): v3.3.2.0Uh huh... Note the version I said fixed this above (3.3.3.2 Beta), and the fact that the current version is 3.3.6.1 Production. P.S. You can get the exact version in your scripts with the @AutoItVersion macro. Edited September 8, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Xibalba Posted September 8, 2010 Author Share Posted September 8, 2010 Ok, updated to latest version and.....voila Thanks for the replies everyone. 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