|
Joined: Jul 2007
Posts: 42
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2007
Posts: 42 |
I have this greet script. ANd it works perfectly, however recently the greet.ini got 2 full of ip's etc. So I made a greet 2.ini and no problems except one. Its supposed to tell you how many people have joined the chan, and how many times you have joiend the chan. Well mine won't go above 35, and I dunno why. I think its because of the 2 ini files but I have no idea. Here is the script: on !*:join:%greetchan: { if (%greetCounter == on) { inc %greet.counter set %greet.join $calc( $readini( greet.ini, greet 2.ini, $address, Join ) +1 ) | writeini greet 2.ini $address Join %greet.join | unset %greet.join if ($right(%greet.counter,2) == 00) || ($right(%greet.counter,2) == 50) { notice $nick 0,2CONGRATS4,2 $nick 0,2you are the4,2 $ord(%greet.counter) 0,2 Visitor To4,2 %greetchan $+ ..0,2This is The4,2 $ord($readini(greet.ini, greet 2.ini, $address, Join)) 0,2Time You Have Visited here...11,2 «×X§Ç®îÞt0®§X×» describe $chan shoots fireworks for4 $nick *~~~~~|#####> `';:*,.,*:;'`12 $nick *~~~~~|#####> `';:*,.,*:;'`9 $nick *~~~~~|#####> `';:*,.,*:;'`7 $nick *~~~~~|#####> `';:*,.,*:;'`13 $nick *~~~~~|#####> `';:*,.,*:;'`11 $nick *~~~~~|#####> `';:*,.,*:;'` } else { notice $nick 0,2Hello And Welcome To4,2 %greetchan $nick $+ . 0,2You are the4,2 $ord(%greet.counter) 0,2 Person that has Visited This Room...This is The4,2 $ord($readini(greet.ini, $address, Join)) 0,2Time You Have Visited here..11,2 «×X§Ç®îÞt0®§X×» } } }
any help you can offer would be greatly appreciated. Thanks 
Last edited by zad0909; 25/10/07 12:32 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I can't see any reason for it to stop at 35, sorry.
Out of curiosity, did you try using the -n switch with the writeini command before going to multiple ini files?
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
I have a fairly major issue with this line: set %greet.join $calc( $readini( greet.ini, greet 2.ini, $address, Join ) +1 ) It's invalid syntax.. $readini() can only read from one ini file at a time.
|
|
|
|
Joined: Jul 2007
Posts: 42
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2007
Posts: 42 |
I have a fairly major issue with this line: set %greet.join $calc( $readini( greet.ini, greet 2.ini, $address, Join ) +1 ) It's invalid syntax.. $readini() can only read from one ini file at a time. Ok well that answeres my question, but how do I fix it? And What would setting -n do?
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
(...) however recently the greet.ini got 2 full of ip's etc. (...) That's where the -n switch for writeini comes into play (Quoting the help file): If the -n switch is specified, mIRC will attempt to write to the .ini file even if it is larger than 64k. Thus, change your writeini line to: "writeini -n greet.ini $address Join %greet.join" ...and you shouldn't need a second .ini file. For convenience, the calculation would be: set %greet.join $calc($readini(greet.ini,$address,Join ) + $readini(greet 2.ini,$address,Join ) +1)Another note: the line if ($right(%greet.counter,2) == 00) || ($right(%greet.counter,2) == 50) { can be shortened to: if (50 // %greet.counter) { ("if %greet.counter is a multiple of 50") Regards 
|
|
|
|
Joined: Jul 2007
Posts: 42
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2007
Posts: 42 |
Thanks 
|
|
|
|
|