mIRC Home    About    Download    Register    News    Help

Topic Options
#103937 - 27/11/04 05:15 PM readini
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
i have this:

$readini(mirc.ini, options, n1)

and that returns

5,100,1,0,634,7,37,0,8,1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,5,0,1,0,0,0,1,0,0

how can i get the value from the number 13 ?

5,100,1,0,634,7,37,0,8,1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,5,0,1,0,0,0,1,0,0
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#103938 - 27/11/04 05:23 PM Re: readini
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
$gettok($readini($mircini,options,n1),13,44)
_________________________
New username: hixxy

Top
#103939 - 27/11/04 05:29 PM Re: readini
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
thnx

do you also know how i can make this as smoth as possible?
i trying to read from mirc.ini if loging is enabled, the problem is that i have 2 lines to check, dont know if its cos im tired, but cant figure out how to solve it.. :tongue:

this line return: 0 if channel log is disabled, else 1
$gettok($readini($mircini,options,n1),13,44)

this line return: 0 if chat log is disabled, else 1
$gettok($readini($mircini,options,n1),14,44)

it should check line 1 .. if thats disabled it should go to line 2, if that also disabled it should set a %var 0, if 1 of the lines is enabled it should reurn a %var 1 .. :tongue:


Edited by sparta (27/11/04 05:41 PM)
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#103940 - 27/11/04 06:24 PM Re: readini
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
Code:
var %varname = $or( [ $gettok($readini($mircini,options,n1),13-14,44) ] )
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top