mIRC Home    About    Download    Register    News    Help

Print Thread
#99433 01/10/04 09:44 PM
Joined: Sep 2003
Posts: 84
T
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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?

#99434 01/10/04 09:48 PM
Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
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

#99435 01/10/04 09:53 PM
Joined: Sep 2003
Posts: 84
T
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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

#99436 01/10/04 10:01 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Use the n flag in $read smile

$read(updater.txt,n,%updater)
$read(mohaa.mrc,n,2)


New username: hixxy
#99437 01/10/04 10:06 PM
Joined: Sep 2003
Posts: 84
T
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
Thnx dude, now its working laugh


Link Copied to Clipboard