mIRC Home    About    Download    Register    News    Help

Print Thread
#17184 28/03/03 07:59 AM
Joined: Mar 2003
Posts: 10
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Mar 2003
Posts: 10
I know I'm doing something wrong... but can't figure it out.. getting annoyed :P

%word1 thru %word10 are diffrent words.
%nword1 the %nword10 are the same words as %word1-10
Just slightly diffrent.

this is suppose to compaire them letter by letter. for each word :P

But the $mid (and maybe $len) don't like doing the %word $+ %n

what would be a better way of changing this... been awheil since I did this :P

while (%n <= 10 ) {
set %length $len(%word $+ %n)
while (%i <= %length) {
%w1 = $mid(%word $+ %n,%i,1)
%w2 = $mid(%nword $+ %n,%i,1)
if ( %w1 != _ ) set %hint = %hint $+ %w1
else %hint = %hint $+ %w2
inc %i
}
set %word $+ %n %hint
set %hint
inc %n
}

Axe

#17185 28/03/03 08:10 AM
Joined: Dec 2002
Posts: 169
J
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
It does not work because mIRC tries to evaluate %word (which is probably nothing). You can use $eval to combine "word" and %n before it evaluates it.

$eval($+(%,word,%n),2)

#17186 28/03/03 12:25 PM
Joined: Mar 2003
Posts: 31
G
GBX Offline
Ameglian cow
Offline
Ameglian cow
G
Joined: Mar 2003
Posts: 31
there are several tutorials out there about dynamic variables if you want to learn more about this


Link Copied to Clipboard