|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
I have never experienced this issue before and I haven't tested it on other version's of mIRC. Only 6.31 so it may be a new issue. It is intermittent.
The issue I am experiencing is not being able to read the 1st line of the ini file. If I have 4 items in the ini file, $ini tell's me I have 3 and $readini tells me the 1st item doesn't exist. This issue is fixed by making the first line of the ini file blank. Allow me to explain.
file.ini
[item1] data1=data1 data2=data2 [item2] data3=data3 data4=data4 extra=extra data [item3] data5=data5 data6=data6
Here is an ini file.
$ini(file.ini,0) should return 3. $ini(file.ini,1) should return 2. $readini(file.ini,item1,data1) should return data1.
My issue is that mIRC is telling me that [data1] does not exist. That there are only 2 items in the file. $ini(file.ini,1) returns 3, because it doesn;t see the first item (data1) and counts the second item (data2) as the first.
Now if I make the first line of the ini file blank, and [data1] is on the second line of the file, mIRC.ini reads it just fine.
I found this error when my code was telling me the item didnt exist. I checked the file and saw it did. I ran some tests trying to retrieve the item with $ini and $readini and couldn't get it work. I made line 1 blank and it all worked fine.
I;d love to get some feedback on this issue. Thanks!
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
$readini(file.ini,item1,data1) returns fine for me, could you paste the actual .ini you have ?
$maybe
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
The issue is intermittent. It has happened to me and other friends on mirc 6.31 only.
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
What OS ? it works fine on my 6.31 on windows 2003 Server Enterprise R2
$maybe
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
Vista, Win2k Pro and WinXP Pro.
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
Well I have seen this same issue happen with vars.ini as well.
The file of course looks like:
[variables] n1= n2= n3=
What happens is I will close mIRC, re-open it and all the old variables are still there. So I check the vars.ini file and I see this:
[variables] n1= n2= n3=
[variables] n1= n2= n3= So on.
SO I delete the old variables and leave a space for the first line and the issue is finally resolved.
I don't know why this is happening. This started happening after using mIRC 6.31.
|
|
|
|
Joined: Mar 2006
Posts: 395
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Mar 2006
Posts: 395 |
I seen this happen a few versions back when the INI file was edited in notepad.
Not sure why it happens though. Try cleaning out both sections in notepad and then setting the options in mIRC.
Hope this helps.
[02:16] * Titanic has quit IRC (Excess Flood)
|
|
|
|
Joined: Mar 2006
Posts: 395
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Mar 2006
Posts: 395 |
Oh, didnt read the bottom resolved bit... Anyway, I think its a bug in the way mIRC writes INI files. Not sure though
[02:16] * Titanic has quit IRC (Excess Flood)
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
This issue seems to arise if I manually edit the ini file then try to read from it. I probably never noticed it before since I typically prefer hash tables.
Does mIRC store the ini file in memory or something? Is this a bug? It seems like one to me.
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
It may very well cache at mIRC's level depending on the ini file you're editing... Can you provide accurate steps to reproduce?
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Jan 2007
Posts: 1,156
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2007
Posts: 1,156 |
I cannot provide accurate steps until I know what causes it. I will mess around with it and see if I can force it to mess up the ini file. check.ini
[check]
9a2a03e4f50a44407ce69f54aab2cd9f=«-♥ßάßε♥-»™
cda6f820e61530f1120bc2110afc2845=☆SantasNurseKim☆
ffaa593b638f70053ceed146fbe7c76e=scarysharee86
6be4eb713cbecc8db63e9a2e92dd7dc1=HammeringHank1967
823af81ebfcea86443cc2c3397e4c4f4=·§tèvié·³²·
1287e140a6f3db31ca57f391a915c022=Patrickk
2f6ede983f428ff9228f7a12aec186df=ŞâŋţâşĻîļßûţţęŗĈŭρ
32806098d98db624e1a35ad1f9d0ab39=MzzMolly
eff4a7c4d8a483e605052ad461e4d913=drydoc007
214c9190e029476dc646bc0764c28aa1=jennifer_phila
c67de690f24fdca199ea590ae8e80c05=Cathy03301
5a2abde8196f74354e8a23ba9551d0cc=Foghorn_Leghorn
2dbf21633f03afcf882eaf10e4b5caca=paranoidandroid
a384a1efbc01be21ea6b0db84bdf5d1f=Over_Knight
370bfb31abd222b582245b977ea5f25a=Déćént~Gúy
7a1730f3cf577b0ad2250df5d64dc9fd=Talonwis
b58e1c900181090e2f0626b7bbde0c91=GloriaP
fcbee6ab5decc1a098af13544f2934c3=TênÐêrFøRÇê
1ef135181362fa0b1161630e65505ad2=~nails~WJS~
be3c6d64d7b62c4fc87fb9ea526dac82=mrmichaels
61293232482f80d6cebd7c96d4cf0371=Toredor84
cb3a1f7e970abd661e560f13793f9987=JT_the_head_elf
2e8852765c69a3aac8a79c8a50a40258=Mickdarat1
905669063311d8a17bd6958cd353eedd=santaspankedjulieanna
f1f615a7a67a325c8804b57e00393358=KatieJae1952
66e8ba8216a1e152d72653d99a4f03ab=Cokeaddict
fbf99289e8c1a22ee95ae6d2fb8ec4ea=Have2Flirt2
4c9c72e414bf0171008ab5c47c4d1b14=purplebunnyfoofoo
15898a944e35c6a3090e3790aa35a5ae=Worknman9
0a77e421202fbcc7b5d13c90de1fc793=ItStaysHere-LV
870da18123cc1e58746fefa6b580991e=RowdyRob
de8a84fd461ad43384634643a55c6d9c=MsCjay Then access the file. //echo -a $ini(check.ini,check,0) Then remove entries manually fromt he file. Then check again. If you get an echo error, manually move all the text in the ini file down a space, making the first line blank and check again.
|
|
|
|
|
|