mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 5
Z
Z3l3zT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Sep 2003
Posts: 5
Heya...

Currently, I'm coding on a fileserver script which uses a ini-based configuration file. Also, the queue system uses a plain text file for $read()-ing/writing the queues.. I thought the script were stable enought for beta testing and let it run for the night.. When I woke up the day after, I had a "Unexpected error at.." and mIRC had crash.. smirk Somewhere in the forums here, I've read something about, mIRC can/will crash if I use readini and writeini at the same time. Not sure if it's true or not but I know that I'm using both $readini and writeini (uses writeini mostly for storing configs, and $readini is used from time to time when the scrips check the config, like if ($readini(...)) {} and so on..) My script is currently about 6000 lines of code and it's quite hard to debug since I don't even know where in the script it is.. I've checked logs and used /debug, but nothing seems to help me.. frown Anyone out there who have an idea or a solution to this annoying error? Thanks.

Regards,
Jesper 'Z3l3zT' Wallin

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
start using hashtables & variables instead of constant reading/writing to file....


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Sep 2003
Posts: 5
Z
Z3l3zT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Sep 2003
Posts: 5
Heya.. and thanks for your answer..

Sure it might be a good solution.. but it still doesn't explain why mIRC crashes.. I can agree that it might be bad coding, but it shouldn't end up with a crash shout it?

Regards,
Jesper 'Z3l3zT' Wallin

Joined: Sep 2003
Posts: 5
Z
Z3l3zT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Sep 2003
Posts: 5
Hello again..

It seems like it's buggy yeah.. I've been using $readini and $read for my script, most of them are used in if-then-else statements and for some reason, it made mIRC crash.. (no idea why) .. I recoded my script to use the variable instead (which both is faster and a better way of coding). Sure, it might were my "fault" mIRC crashed due to bad coding.. but it shouldn't end up with a crash.. After I recoded my script, mIRC doesn't seems to crash and everything are working fine now.. but yet, the bug seems to be there somewhere.. frown

Regards,
Jesper 'Z3l3zT' Wallin

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Are you using the 'n' parameter, which prevents $read(ini) from evaluating what it reads as script code?


* cold edits his posts 24/7
Joined: Sep 2003
Posts: 5
Z
Z3l3zT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Sep 2003
Posts: 5
Heya, and thanks for your reply..

Oh.. heh, didn't even knew it existed.. :tongue: i thought it treated all $read(ini)'s as plain-text.. but sure, yet the problem/bug exists, even if I do or do not use variables, hashtables and use the "n", it shouldn't return in a crash should it? I bet this solves the problem for good.. but the problem still remains.. smirk

Regards,
Jesper 'Z3l3zT' Wallin


Link Copied to Clipboard