mIRC Homepage
Posted By: Turbo_boy /write + $read - 01/10/04 09:44 PM
I'm making an script to auto encode files that I want to, but now I got an error:

* No such identifier: $null)

^^ He reads my mohaa.mrc on line 2 end gives this error

Example:

On my mohaa.mrc (first 4 lines):

on *:start: {
.if (%mohaa.dir == $null) { .set %mohaa.dir c:\games\mohaa | halt }
.else { halt }
}


My script is reading the file with:

$read(mohaa.mrc, 2)

Then I get the error named:

* No such identifier: $null)

What I think if I'm reading the file he will auto check the script that I'm reading?? My this be an bug or can I do something on it?
Posted By: Danthemandoo Re: /write + $read - 01/10/04 09:48 PM
remove the .'s except the one in your variable name, and theres no need to halt either.

on *:start: {
if (%mohaa.dir == $null) { set %mohaa.dir c:\games\mohaa }
}
is perfectly fine
Posted By: Turbo_boy Re: /write + $read - 01/10/04 09:53 PM
It's not going on the mohaa.mrc but the $read script:


%updater = 0
while (%updater < $lines(updater.txt)) {
.inc %updater
.if (%updater >= 50) { echo -a ERROR | halt }
%updater2 = 0
while (%updater2 < $lines($read(updater.txt, %updater))) {
.if (%updater2 >= 50) { echo -a ERROR | halt }
.inc %updater2
.echo $read(mohaa.mrc, 2)
.write new.html %tekst
}
}
}


He will give the error on reading the mohaa.mrc
Posted By: tidy_trax Re: /write + $read - 01/10/04 10:01 PM
Use the n flag in $read smile

$read(updater.txt,n,%updater)
$read(mohaa.mrc,n,2)
Posted By: Turbo_boy Re: /write + $read - 01/10/04 10:06 PM
Thnx dude, now its working laugh
© mIRC Discussion Forums