Jump to content
Sign in to follow this  
emoyasha

INI parsing error

Recommended Posts

emoyasha

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)-----------------------------------

 

Share this post


Link to post
Share on other sites
FreeFry

Where exactly do you get an error?

Maybe providing with a example code would make it easier to help you. :D

Shit, missed that error. :E

Edited by FreeFry

Share this post


Link to post
Share on other sites
rasim

emoyasha

Try 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)

Share this post


Link to post
Share on other sites
FreeFry

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. :D

Damn, I so totally missed that. :E

Share this post


Link to post
Share on other sites
rasim

FreeFry

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

Yes! You are right! :D

Share this post


Link to post
Share on other sites
emoyasha

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)-----------------------------------

 

Share this post


Link to post
Share on other sites
emoyasha

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)-----------------------------------

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×