bman Posted March 23, 2006 Share Posted March 23, 2006 (edited) ok... here is the piece of code that is not working... $conoptions = StringSplit($line, "|") ;MsgBox ( 0, "test", UBound($conoptions)) $FileName = $conoptions[1] $NumOfPages = $conoptions[3] $line is a variable that includes a string that looks like this "FileName|Old Layout|1|Standard|Special" i get this error:$NumOfPages = $conoptions[3]$NumOfPages = ^ERROR Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded The wierd thing is, that everything that happens after that line, works fine. The code I am working on is used to move files from one location to another, based on some info from a database. All the files get moved to the correct place, so the code works, it just throws up this error. I put the code "MsgBox ( 0, "test", UBound($conoptions))" just to test it... and the wierd this is that 2 Message Boxes show up when I just put the code for 1 in, the first one says "6" and the second one says "2" Edited March 23, 2006 by bman Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 23, 2006 Share Posted March 23, 2006 Hi, maybe you should try to add a _ArrayDisplay() to see what is really saved. Remember , that Ubound ist always 1 higher than the size of the array. Hope that helps. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
bman Posted March 23, 2006 Author Share Posted March 23, 2006 Hi,maybe you should try to add a _ArrayDisplay() to see what is really saved.Remember , that Ubound ist always 1 higher than the size of the array.Hope that helps.So long,MegaI'll try the _ArrayDisplay() and see what I get.And I am aware that Ubound size will be one higher than the last number in the array (because arrays start on zero), but the question is, why would the code for 1 MSG BOX bring up 2? I am sure something wierd is going no there, i just can't figure out what. Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 23, 2006 Share Posted March 23, 2006 Hi, if you can´t figure it out. Post the code, I´m sure someone will show you the right direction. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
bman Posted March 23, 2006 Author Share Posted March 23, 2006 ok... I am looking into things a little deeper... and this may not be a problem with my code... it may be a problem with the filemaker database that is calling the code... i'll let you guys know... Link to comment Share on other sites More sharing options...
bman Posted March 23, 2006 Author Share Posted March 23, 2006 (edited) ok... I got it fixed... the problem was not the code. There problem exsisted in the Filemaker Database that was calling the auto it program. One of the paremeters that gets sent to this program from the filemaker database is the current number of records in the found set, which for most cases should be 1. However some how in filemaker that number got hard coded to be 1402, which is just not good. I changed the settings of the calculation in filemaker to make sure it updates every time the found set is changed... all is well now. Posting in the forum was very helpful though, I was located the error while I was trying to put together some info to post in the forum. Thanks to those who read my post and thank th.meger for trying to help. Edited March 23, 2006 by bman 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