emoyasha Posted January 20, 2008 Share Posted January 20, 2008 i have an error on startup of messenger server. okay basicly when too much information is in the .ini the code wont parse it and will say number of scripts or sub scripts is exceeded, any help? its very important code For $x = 0 to UBound($Email)-1 If IniRead($Ini,$Email[$x],"Activated", 0) = 1 Then _ArrayAdd($Password, IniRead($Ini,$Email[$x],"Password", "??NoPassword??")) _ArrayAdd($DispName, IniRead($Ini,$Email[$x],"DisplayName", "??NoDisplayname??")) Else _ArrayDelete($Email,$x) EndIf Next _ArrayDelete($Password,0) _ArrayDelete($DispName,0) Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Link to comment Share on other sites More sharing options...
FreeFry Posted January 20, 2008 Share Posted January 20, 2008 (edited) Where exactly do you get an error? Maybe providing with a example code would make it easier to help you. Shit, missed that error. :E Edited January 20, 2008 by FreeFry Link to comment Share on other sites More sharing options...
rasim Posted January 20, 2008 Share Posted January 20, 2008 emoyashaTry this:$Ubound = UBound($Email) - 1 For $x = $Ubound To 0 Step - 1 If IniRead($Ini,$Email[$x],"Activated", 0) = 1 Then _ArrayAdd($Password, IniRead($Ini,$Email[$x],"Password", "??NoPassword??")) _ArrayAdd($DispName, IniRead($Ini,$Email[$x],"DisplayName", "??NoDisplayname??")) Else _ArrayDelete($Email,$x) EndIf Next _ArrayDelete($Password,0) _ArrayDelete($DispName,0) Link to comment Share on other sites More sharing options...
FreeFry Posted January 20, 2008 Share Posted January 20, 2008 Oh damn, I missed that! Just a little explaination why it pops up that error: The Ubound($Email)-1 in the beginning of your loop only evaluates once, and that's when it first enters the loop. Therefore if you delete an element in the array in the middle of the loop, it will (eventually) try to access a part of the array which is not there any more, and throw that naughty error. Damn, I so totally missed that. :E Link to comment Share on other sites More sharing options...
rasim Posted January 20, 2008 Share Posted January 20, 2008 FreeFryThe Ubound($Email)-1 in the beginning of your loop only evaluates once, and that's when it first enters the loop.Therefore if you delete an element in the array in the middle of the loop, it will (eventually) try to access a part of the array which is not there any more, and throw that naughty errorYes! You are right! Link to comment Share on other sites More sharing options...
emoyasha Posted January 20, 2008 Author Share Posted January 20, 2008 ok, so say, this goes to a server for a instant messenger, a user signs up, and needs the activation code to sign in. they still have their client open and the client is trying to read the code to make sure its right, and its in the middle of cumunication and then i close the server. would that cause that? or is there maybe a problem where it just cant hold all the info, if there is to much? please explain further, im kinda new at this stuff Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Link to comment Share on other sites More sharing options...
emoyasha Posted January 20, 2008 Author Share Posted January 20, 2008 hello? Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- 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